How-to Copy symbolic links itself, not the content?
Moderators: Hacker, petermad, Stefan2, white
How-to Copy symbolic links itself, not the content?
Is it possible to copy symbolic links in TC 8 or 9 beta, created in Windows with mklink /d?
When I try to copy the link using F5, it copies the whole content of the target directory, just not the link itself.
Thanks
When I try to copy the link using F5, it copies the whole content of the target directory, just not the link itself.
Thanks
From the help "Settings in the file wincmd.ini (Part 1)":
CopyLinks=1 Copy file system links (junctions) as links and not as directories:
0: Copy links as dirs or ignore them (if IgnoreLinks has been set)
1: Copy links without changing the target path of the links
2: Copy links and change the target path to the target drive if the link points to the same drive on which the link itself is located.
Example:
c:\path1\link, pointing to c:\path1\path2\linktarget
Copied to d:\trgpath1\trgpath2\link
-> Link now points to d:\trgpath1\trgpath2\path2\linktarget
CopyLinks=1 Copy file system links (junctions) as links and not as directories:
0: Copy links as dirs or ignore them (if IgnoreLinks has been set)
1: Copy links without changing the target path of the links
2: Copy links and change the target path to the target drive if the link points to the same drive on which the link itself is located.
Example:
c:\path1\link, pointing to c:\path1\path2\linktarget
Copied to d:\trgpath1\trgpath2\link
-> Link now points to d:\trgpath1\trgpath2\path2\linktarget
Windows 11 Home, Version 24H2 (OS Build 26100.3915)
TC 11.51 x64 / x86
Everything 1.5.0.1391a (x64), Everything Toolbar 1.5.2.0, Listary Pro 6.3.2.88
QAP 11.6.4.2.1 x64
TC 11.51 x64 / x86
Everything 1.5.0.1391a (x64), Everything Toolbar 1.5.2.0, Listary Pro 6.3.2.88
QAP 11.6.4.2.1 x64
I suggest the opposite.MVV wrote:But I don't recommend using this option because it may cause data loss if you will need to make a backup copy of this folder.
Backups are made by backup the targets where they are.
Following links produces in almost all cases duplicate backups.
Windows 11 Home, Version 24H2 (OS Build 26100.3915)
TC 11.51 x64 / x86
Everything 1.5.0.1391a (x64), Everything Toolbar 1.5.2.0, Listary Pro 6.3.2.88
QAP 11.6.4.2.1 x64
TC 11.51 x64 / x86
Everything 1.5.0.1391a (x64), Everything Toolbar 1.5.2.0, Listary Pro 6.3.2.88
QAP 11.6.4.2.1 x64
I agree with both MVV and Horst.Epp, - and that's the beauty of Total Commander. You decide for yourself the level of danger, you want to have. 
My choice is to keep using TC in the 'old' way, and always make it copy the contents(!) of the symbolic links - BUT - when I have to copy symbolic links (etc.) as links, I use the freeware program 'Fastcopy' (by S. Hiroaki) which can be nicely configured, and it is easy to implement in TC's menu system.
In that way, it is hard, NOT to remember, how symbolic links are dealt with, when they are copied.

My choice is to keep using TC in the 'old' way, and always make it copy the contents(!) of the symbolic links - BUT - when I have to copy symbolic links (etc.) as links, I use the freeware program 'Fastcopy' (by S. Hiroaki) which can be nicely configured, and it is easy to implement in TC's menu system.
In that way, it is hard, NOT to remember, how symbolic links are dealt with, when they are copied.

HerbieH*
-Keep on makin' music!
-Keep on makin' music!
I made a big mistake using total commander. I moved a folder containing symlink and it has copied & moved all files under the symlink. Move operation has removed all files under a location that is not belong the folder I moved. Moving these files under the symlink is dangerous.
I think it should work like unix commands. When you want to copy content, you should specify -L, --dereference (always follow symbolic links in SOURCE) if you don't specify it copy the symlink.
In total commander we should have a checkbox (dereference) in copy / move and delete interface.
I think it should work like unix commands. When you want to copy content, you should specify -L, --dereference (always follow symbolic links in SOURCE) if you don't specify it copy the symlink.
In total commander we should have a checkbox (dereference) in copy / move and delete interface.
Re: How-to Copy symbolic links itself, not the content?
me too!!! PLEASE add the available options..
- into Settings/ Copy options
- into the copy dialog options
Re: How-to Copy symbolic links itself, not the content?
Hi, regards from Colombia, I affix to the motion, every time I need to change the behavior of symbolic lynks copy, end in this thread, I have Dori's memory ha ha ha
. If will possible to add the setting in the copy dialog, will be super. Thanks a lot for all your effort.

Impeeza jaja
Re: How-to Copy symbolic links itself, not the content?
Hi,
I know this is an old thread but I think I'm having the same issue that redfox had but the suggestion is not working for me.
I want to create a directory structure for the Marvel Comics TV Shows and Movies. And I want there to be an MCU directory that has everything in the right order, but I also want the films and tv shows to be under specific character directories without duplicating the contents. So:
marvel\mcu\infinity saga\phase 1\1-iron man
marvel\mcu\infinity saga\phase 1\2-the incredible hulk
marvel\mcu\infinity saga\phase 1\3-thor
marvel\mcu\infinity saga\phase 1\4-iron man 2
marvel\mcu\infinity saga\phase 1\5-captain america the first avenger
marvel\mcu\infinity saga\phase 1\6-the avengers
marvel\mcu\infinity saga\phase 3\1-black widow
marvel\mcu\infinity saga\phase 3\2-wanda vision
So the content will be in those directories. Then I want to have:
marvel\films\iron man -- link to marvel\mcu\infinity saga\phase 1\1-iron man
marvel\films\iron man 2 -- link to marvel\mcu\infinity saga\phase 1\4-iron man 2
marvel\films\thor -- link to marvel\mcu\infinity saga\phase 1\3-thor
marvel\tv\wanda vision - link to marvel\mcu\infinity saga\phase 3\2-wanda vision
etc for the others
Also notice I changed the name of the link to remove the leading order number
And I want to have:
marvel\characters\iron man with links to both 1-iron man and 4-iron man 2
etc for the others
When I want to backup the marvel directory, I want the links to copy to the target as links relative to the target location and not copy the contents of the original source to the target link location.
I've tried xcopy with both symbolic links and junctions and those don't work. So I found this thread and I tried manually editing the wincmd.ini file, adding CopyLinks under [Configuration] and tried 1 and 2 and both copied the links as actual directories as well as copied the contents. I thought =2 would work but it didn't. I also closed TC before I made the change and restarted it after making the change to make sure it read the new setting.
This is TC 10.50 x64 on Win 10 (although I will really be doing this on Win 7). Did I do something wrong? Also, which would be better--symbolic links or junctions?
Please help.
Thanks
rahreg
I know this is an old thread but I think I'm having the same issue that redfox had but the suggestion is not working for me.
I want to create a directory structure for the Marvel Comics TV Shows and Movies. And I want there to be an MCU directory that has everything in the right order, but I also want the films and tv shows to be under specific character directories without duplicating the contents. So:
marvel\mcu\infinity saga\phase 1\1-iron man
marvel\mcu\infinity saga\phase 1\2-the incredible hulk
marvel\mcu\infinity saga\phase 1\3-thor
marvel\mcu\infinity saga\phase 1\4-iron man 2
marvel\mcu\infinity saga\phase 1\5-captain america the first avenger
marvel\mcu\infinity saga\phase 1\6-the avengers
marvel\mcu\infinity saga\phase 3\1-black widow
marvel\mcu\infinity saga\phase 3\2-wanda vision
So the content will be in those directories. Then I want to have:
marvel\films\iron man -- link to marvel\mcu\infinity saga\phase 1\1-iron man
marvel\films\iron man 2 -- link to marvel\mcu\infinity saga\phase 1\4-iron man 2
marvel\films\thor -- link to marvel\mcu\infinity saga\phase 1\3-thor
marvel\tv\wanda vision - link to marvel\mcu\infinity saga\phase 3\2-wanda vision
etc for the others
Also notice I changed the name of the link to remove the leading order number
And I want to have:
marvel\characters\iron man with links to both 1-iron man and 4-iron man 2
etc for the others
When I want to backup the marvel directory, I want the links to copy to the target as links relative to the target location and not copy the contents of the original source to the target link location.
I've tried xcopy with both symbolic links and junctions and those don't work. So I found this thread and I tried manually editing the wincmd.ini file, adding CopyLinks under [Configuration] and tried 1 and 2 and both copied the links as actual directories as well as copied the contents. I thought =2 would work but it didn't. I also closed TC before I made the change and restarted it after making the change to make sure it read the new setting.
This is TC 10.50 x64 on Win 10 (although I will really be doing this on Win 7). Did I do something wrong? Also, which would be better--symbolic links or junctions?
Please help.
Thanks
rahreg
Re: How-to Copy symbolic links itself, not the content?
2rahreg
1. Open marvel\movies\ In the passive panel.
2. Press Ctrl+B on the active panel with marvel\mcu\infinity saga\phase 1.
3. Select the desired files and click the button with NTLinksMaker (with system bitness):
1. Open marvel\movies\ In the passive panel.
2. Press Ctrl+B on the active panel with marvel\mcu\infinity saga\phase 1.
3. Select the desired files and click the button with NTLinksMaker (with system bitness):
TOTALCMD#BAR#DATA
%COMMANDER_PATH%\Utils\NTLinksMaker\NTLinksMaker.exe
/b /q /sr? /r="%P" "@%WL" "%T*"
Utils\NTLinksMaker\NTLinksMaker.exe
Create symbolic links in another panel
Overquoting is evil! 👎
Re: How-to Copy symbolic links itself, not the content?
Hi Fla$her, thanks for the response. I actually want the links to be on the directory not the file so I hope what you are recommending will work for that. Unfortunately I don't understand what you are saying for #3.Fla$her wrote: 2022-10-07, 16:33 UTC 2rahreg
1. Open marvel\movies\ In the passive panel.
2. Press Ctrl+B on the active panel with marvel\mcu\infinity saga\phase 1.
3. Select the desired files and click the button with NTLinksMaker (with system bitness):TOTALCMD#BAR#DATA
%COMMANDER_PATH%\Utils\NTLinksMaker\NTLinksMaker.exe
/b /q /sr? /r="%P" "@%WL" "%T*"
Utils\NTLinksMaker\NTLinksMaker.exe
Create symbolic links in another panel
What does system bitness mean?
Is NTLinksMaker a TC plugin?
Does it install the button?
What am I supposed to do with the code you quoted?
Where do I get NTLinksMaker? I googled it and tried totalcmd.net but there was a problem going to that site. Other sites don't look safe, and I don't see it listed on https://www.ghisler.com/plugins.htm
But will this allow me to copy a structure to another drive, keep the links relative to the target, and not double copy the files? And do it from TC?
Also any ideas why changing the ini file didn't work?
Thanks
rahreg
Re: How-to Copy symbolic links itself, not the content?
Links to folders? Then I misunderstood the task. In this case, this tool will not fully work, because you need to change the names of the link folders according to the list of correspondences. Here we need a loop with the utility ln.exe. I can help with that later.
Windows architecture: 32/64 bit.
No, it's a utility/addon.
I don't understand the question. You insert the button by code from the clipboard yourself through the context menu of the toolbar.
Already nothing. Need another.
Overquoting is evil! 👎