How-to Copy symbolic links itself, not the content?

English support forum

Moderators: sheep, Hacker, Stefan2, white

Post Reply
redfox
Junior Member
Junior Member
Posts: 97
Joined: 2015-02-09, 11:36 UTC
Location: Czech Republic

How-to Copy symbolic links itself, not the content?

Post by *redfox » 2016-08-20, 10:33 UTC

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

User avatar
Horst.Epp
Power Member
Power Member
Posts: 3430
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Post by *Horst.Epp » 2016-08-20, 11:14 UTC

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
Windows 10 Home x64 November 2019 Update, Version 1909 (OS Build 18363.476)
Intel(R) Core(TM) i7-4770 CPU @ 3.40GH, 16GB RAM
TC 9.50ß5 x64 / x86, Everything 1.4.1.955 (x64)

redfox
Junior Member
Junior Member
Posts: 97
Joined: 2015-02-09, 11:36 UTC
Location: Czech Republic

Post by *redfox » 2016-08-20, 12:12 UTC

Thank you, it works as expected.

User avatar
MVV
Power Member
Power Member
Posts: 8389
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV » 2016-08-20, 13:47 UTC

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.

User avatar
Horst.Epp
Power Member
Power Member
Posts: 3430
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Post by *Horst.Epp » 2016-08-20, 14:39 UTC

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.
I suggest the opposite.
Backups are made by backup the targets where they are.
Following links produces in almost all cases duplicate backups.
Windows 10 Home x64 November 2019 Update, Version 1909 (OS Build 18363.476)
Intel(R) Core(TM) i7-4770 CPU @ 3.40GH, 16GB RAM
TC 9.50ß5 x64 / x86, Everything 1.4.1.955 (x64)

User avatar
MVV
Power Member
Power Member
Posts: 8389
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV » 2016-08-20, 15:16 UTC

I forgot to disable this option and copied a folder with junctions in order to backup it... but got only junctions. This is dangerous.

User avatar
HerbieH
Member
Member
Posts: 107
Joined: 2003-02-11, 10:04 UTC

Post by *HerbieH » 2016-08-21, 21:39 UTC

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. :)
HerbieH*
-Keep on makin' music!

User avatar
MVV
Power Member
Power Member
Posts: 8389
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV » 2016-08-22, 07:04 UTC

It would be nicer to have an option in copy dialog anyway, and it was requested more than once...

ylupien
New Member
New Member
Posts: 1
Joined: 2018-03-28, 17:16 UTC
Location: Deux-Montagnes

Post by *ylupien » 2018-03-28, 17:29 UTC

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.

LeeBinder
Junior Member
Junior Member
Posts: 14
Joined: 2009-07-18, 23:09 UTC

Re: How-to Copy symbolic links itself, not the content?

Post by *LeeBinder » 2019-08-07, 09:52 UTC

me too!!! PLEASE add the available options..
  • into Settings/ Copy options
  • into the copy dialog options
THANK YOU CHRISTIAN!

User avatar
Impeeza
Junior Member
Junior Member
Posts: 17
Joined: 2004-04-30, 15:04 UTC

Re: How-to Copy symbolic links itself, not the content?

Post by *Impeeza » 2019-10-22, 16:35 UTC

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 :lol: . If will possible to add the setting in the copy dialog, will be super. Thanks a lot for all your effort.
Impeeza jaja

Post Reply