creating hard/symlinks - which way / plugin is better?
Moderators: Hacker, petermad, Stefan2, white
creating hard/symlinks - which way / plugin is better?
i need to create symoblic or hard links ot files;
1) I didn't find a bulit-in solution; i guess it is not yet implemented
2) i found 3 pluings that pretend to link files:
NTLinks (wdx)
ntfslinks (util)
NiftyLink (what is that?)
Currently I'm using ntfslinks, which creates hard-links, and so far it does its job.
(it have to be set up manually, and then assigned to a special shortcut-key, or menu, or button)
1) Is there another plugin or feature to craete links?
2) Is there a way to choose either soft or hard links ? (i don't know windows architecture THAT much)
thank you!
1) I didn't find a bulit-in solution; i guess it is not yet implemented
2) i found 3 pluings that pretend to link files:
NTLinks (wdx)
ntfslinks (util)
NiftyLink (what is that?)
Currently I'm using ntfslinks, which creates hard-links, and so far it does its job.
(it have to be set up manually, and then assigned to a special shortcut-key, or menu, or button)
1) Is there another plugin or feature to craete links?
2) Is there a way to choose either soft or hard links ? (i don't know windows architecture THAT much)
thank you!
There are hardlinks (only for files within same volume; in fact, simply multiple folder entries for same file) and junctions (only for folders) available on all Windows NT systems, and symbolic links (for files and folders) available since Windows Vista.
NTFSLinks supports hardlinks and junctions, NTLinks allows converting folders to junctions or editing existing junctions and symlinks.
NiftyLink only creates special files (like LNK) that contain commands allowing to open programs and documents when such file is opened by NiftyLink.
NTFSLinks supports hardlinks and junctions, NTLinks allows converting folders to junctions or editing existing junctions and symlinks.
NiftyLink only creates special files (like LNK) that contain commands allowing to open programs and documents when such file is opened by NiftyLink.
2zaffi
You can find menu items for this (under "Misc.") if you download and install my extended menu - see http://www.ghisler.ch/board/viewtopic.php?t=33740
You can find menu items for this (under "Misc.") if you download and install my extended menu - see http://www.ghisler.ch/board/viewtopic.php?t=33740
License #524 (1994)
Danish Total Commander Translator
TC 11.55rc4 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1393a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.55rc4 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1393a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Junction is another way for junctions (symlink) in Windows XP, Vista, 7 (I did not try in Win8)
Button:
> Command: Path\To\junction.exe
> Parameters: ?"%T%S1" "%P%S1"
Just locate the cursor on the source dir and press button. It asks you to create junction in other panel.
Button:
> Command: Path\To\junction.exe
> Parameters: ?"%T%S1" "%P%S1"
Just locate the cursor on the source dir and press button. It asks you to create junction in other panel.
thank you;petermad wrote: You can find menu items for this (under "Misc.") if you download and install my extended menu
(I wish it was available as a checkbox from F5... anyway)
I didn't want to install your menus,
so i copied your em_ext_*link sections
into my
Code: Select all
usercmd.ini
and now I can use them from the menu / keyboard / start-menus / buttons.
for other users, here are Petermad's definitions for em_ext_junction, em_ext_symlinkd, em_ext_symlink, em_ext_hardlink
Code: Select all
[em_ext_junction]
cmd=%COMSPEC% /K
param=if exist %P%N\* (mklink /J %T%N %P%N) else (echo The cursor must be on a FOLDER)
path=%SYSTEMDRIVE%\
menu=Make Junction in Opposite Panel to FOLDER Under Cursor (Not on Network)
button=%COMMANDER_EXE%,12
[em_ext_symlinkd]
cmd=*%COMSPEC% /K
param=if exist %P%N\* (mklink /D %T%N %P%N) else (echo The cursor must be on a FOLDER)
path=%SYSTEMDRIVE%\
menu=Make Symlink in Opposite Panel to FOLDER Under Cursor
button=%COMMANDER_EXE%,12
[em_ext_symlink]
cmd=*%COMSPEC% /K
param=if not exist %P%N\* (mklink %T%N %P%N) else (echo The cursor must be on a FILE)
path=%SYSTEMDRIVE%\
menu=Make Symlink in Opposite Panel to FILE Under Cursor
button=%COMMANDER_EXE%,12
[em_ext_hardlink]
cmd=%COMSPEC% /K
param=if not exist %P%N\* (mklink /H %T%N %P%N) else (echo The cursor must be on a FILE)
path=%SYSTEMDRIVE%\
menu=MAke Hardlink in Opposite Panel to FILE Under Cursor (Only on Same Drive)
button=%COMMANDER_EXE%,12
That's much better:

(it asks for link name, for link type, and it tries to elevate process in case of symlink; and it waits for anykey for close)
(my AskParam and Sudo are used)
Code: Select all
Command: AskParam.exe
Parameters: /c"Create folder link" /t"%T%N" /p"Create link for %N as:" /rl /t"Junction: /J" /t"Symbolic link: /D" /p(h)"Select link type:" cmd.exe /c "if %%2==/J (title Make junction & mklink /J "%%1" "%P%N" & pause) else (start "" Sudo.exe cmd.exe /c "title Make symbolic link & mklink /D "%%1" "%P%N" & pause")"

(it asks for link name, for link type, and it tries to elevate process in case of symlink; and it waits for anykey for close)
(my AskParam and Sudo are used)
Button with cmd /c mklink
Another simple option for junctions is to create a button with the command:
and with the parameters:
This is very simple in Win Vista, 7 and 8 as the mklink is already present as a shell command.
This sufficient especially to create junctions for Dropbox oder GDrive synchronisation, which is the most frequent case I'm using junctions for.
Code: Select all
cmd /c mklink /j
Code: Select all
%T%N %P%N
This sufficient especially to create junctions for Dropbox oder GDrive synchronisation, which is the most frequent case I'm using junctions for.
That's a nice (uber-geek) menu. You could improve the above by combining the "Symlink to File" and "Symlink to Folder" into a single entry called "Symlink to File/Folder Under Cursor" and to close the command window if the link is successful (otherwise keep it open if an error occurs)petermad wrote:2zaffi
You can find menu items for this (under "Misc.") if you download and install my extended menu - see http://www.ghisler.ch/board/viewtopic.php?t=33740
Code: Select all
if exist %P%N%\* (mklink /D %T%N %P%N && exit) else (mklink %T%N %P%N && exit)
Cheers.
mastabog,
This one will work with empty folders too:)
You can also try my new NTLinksMaker tool (which is a part of NTLinks package). It supports all kind of NTFS links and is able to request elevation when creating symbolic links.
This one will work with empty folders too:)
Code: Select all
if exist "%P%O.%E\..." (mklink
Thanks. I did try NTLinks but unless I missed anything, I found it very cumbersome to work with (open file attrs panel, then click on plugin more attrs, then click and select plugin ntlinks, then click "+" to select link type, then type path ...) ... it becomes easier to open cmd and type mklink OPTS <target> <link>.MVV wrote:mastabog,
This one will work with empty folders too:)You can also try my new NTLinksMaker tool (which is a part of NTLinks package). It supports all kind of NTFS links and is able to request elevation when creating symbolic links.Code: Select all
if exist "%P%O.%E\..." (mklink
I installed Link Shell Extension which provides right click options and also file properties tab to edit the symlink/junction target.