Create mklink
Posted: Fri Feb 09, 2024 1:02 pm
A convenient way to create symlink, hardlink
menu(title="Create mklink" image=icon.show_hidden_files)
{
item(
type='file|dir|back.dir|drive'
title="Symlink"
cmd admin
args=if(
input("Create a symlink", "Link Folder Path"),
'/c mklink @if(sel.type==1,null,"/d") "@input.result\@sel.file.name" "@sel.path"'
)
)
item(
type='file|dir|back.dir|drive'
title="Hardlink"
cmd admin
args=if(
input("Create a hardlink", "Link Folder Path"),
'/c mklink /h @if(sel.type==1,null,"/d") "@input.result\@sel.file.name" "@sel.path"'
)
)
item(
type='dir|back.dir|drive'
title="Junction"
cmd admin
args=if(
input("Create a symlink", "Link Folder Path"),
'/c mklink /j @if(sel.type==1,null,"/d") "@input.result\@sel.file.name" "@sel.path"'
)
)
}