Is it possible to copy file symlinks as links?

English support forum

Moderators: white, Hacker, petermad, Stefan2

SlimShaggy
Junior Member
Junior Member
Posts: 6
Joined: 2013-07-12, 07:57 UTC

Is it possible to copy file symlinks as links?

Post by *SlimShaggy »

I can't find a way to configure TC to copy file symlinks (not directory junctions) as links. Is it at all possible? Setting CopyLinks=1 in the config file does not help here, I guess it applies to directory junctions only.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Is it possible to copy file symlinks as links?

Post by *ghisler(Author) »

No, unfortunately file symlinks cannot currently be copied, only directory symlinks.
Author of Total Commander
https://www.ghisler.com
User avatar
HerbieH
Member
Member
Posts: 145
Joined: 2003-02-11, 10:04 UTC

Re: Is it possible to copy file symlinks as links?

Post by *HerbieH »

Hello SlimShaggy.

You can use 'FastCopy ver 3.52' for copying file-symbolic links.
https://fastcopy.jp/en/
It will retain the symbolic link correctly back to the 'original' file, and not just make a 'new' symbolic link of the symbolic link, you try to copy.

Remember to make the setting:
Main settings - Copy/Move options - Copy Junction/Symlink as Junction/Symlink (not target)

PS: The 'FastCopy.chm' file gives an excellent description (jap/eng) on how to use command lines, which is easy to use in a TC-icon.
I personally use: /auto_close /open_window /cmd=update /estimate %S /to="%T"
HerbieH*
-Keep on makin' music!
User avatar
Hacker
Moderator
Moderator
Posts: 13052
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Re: Is it possible to copy file symlinks as links?

Post by *Hacker »

Just FYI, I got a few errors while copying with FastCopy (never with TC).

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
User avatar
HerbieH
Member
Member
Posts: 145
Joined: 2003-02-11, 10:04 UTC

Re: Is it possible to copy file symlinks as links?

Post by *HerbieH »

To Roman.

What errors?

I have used FastCopy for years and never had any any errors. (I always use latest version.)
It detects all junctions perfectly, and I heavly rely on it on my FTP-server work etc.

Total Commander ALSO does a great job for me :D , and I rely very much on TC too for my server work, like FTP-file transfer etc.

But FastCopy has a better way of continue copying on errors - and then giving me a list of errors at the end.
..and it integrates nicely into TC. :)
HerbieH*
-Keep on makin' music!
User avatar
Hacker
Moderator
Moderator
Posts: 13052
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Re: Is it possible to copy file symlinks as links?

Post by *Hacker »

HerbieH,
To be honest I do not remember anymore, some kind of I/O errors a few months back after which the copy could not be resumed. I was transferring one 8 TB file from an internal hard drive to an external USB hard drive.

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
User avatar
HerbieH
Member
Member
Posts: 145
Joined: 2003-02-11, 10:04 UTC

Re: Is it possible to copy file symlinks as links?

Post by *HerbieH »

Roman thanks for your answer.

A 'big pancake'. :wink: My biggest filecopy to this day has been a 1.4 TB Veracrypt container - and I honestly don't remember if i used FastCopy or TC internal..

I will test very big files on FastCopy at some point in the future, and let the forum know...
HerbieH*
-Keep on makin' music!
LeeBinder
Junior Member
Junior Member
Posts: 14
Joined: 2009-07-18, 23:09 UTC

Re: Is it possible to copy file symlinks as links?

Post by *LeeBinder »

me too!!! PLEASE add the available options..
  • into Settings/ Copy options
  • into the copy dialog options
THANK YOU CHRISTIAN!
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Is it possible to copy file symlinks as links?

Post by *ghisler(Author) »

Have a look at the option CopyLinks in wincmd.ini (section 4b in the help). There are options to just copy it 1:1, or adjust the target path when copying between drives.
Author of Total Commander
https://www.ghisler.com
User avatar
byblo
Senior Member
Senior Member
Posts: 270
Joined: 2005-02-20, 21:13 UTC
Contact:

Re: Is it possible to copy file symlinks as links?

Post by *byblo »

Since i started using heavily directories and files in symlink, i feel stuck with TC now...

* Copying a symlink file does not work (file is duplicated instead)
* Syncronizing my backups gives now empty directories instead of symlink directories, and files can be either ignored or duplicated...

Thus, it became impossible to use TC just to simply copy or make backup where symbolic links are used...

Close to give up with TC. It was great 10 years ago, but getting very outdated/broken on many ways :(
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Is it possible to copy file symlinks as links?

Post by *ghisler(Author) »

No, only directory symlinks.
Author of Total Commander
https://www.ghisler.com
konfekt
Junior Member
Junior Member
Posts: 12
Joined: 2021-11-16, 09:26 UTC

Re: Is it possible to copy file symlinks as links?

Post by *konfekt »

Good morning,

I am sorry for resurrecting this very old thread (and I can open a new one, if preferred), but in the latest stable version 10.52 of Total Commander I still do not know how to copy symlinks to files as symlinks despite applying the settings as given in viewtopic.php?t=40835.

As far as I know, Total Commander, like Double Commander that can copy symlinks to files as symlinks, is written in Pascal, so I wonder if it could be possible after all?

If not, how about a warning message, as I tend to forget that Total Commander replaces the symlinks to files in folders by files.
konfekt
Junior Member
Junior Member
Posts: 12
Joined: 2021-11-16, 09:26 UTC

Re: Is it possible to copy file symlinks as links?

Post by *konfekt »

In the meanwhile, using FastCopy (which is free for non-professional use) serves as a workaround as it copies symlinks as symlinks by default (instead of replacing them on the target by their target linked to) by pressing Ctrl+F5, as follows (from https://www.ghisler.ch/board/viewtopic.php?p=173362#p173362):

Add to usercmd.ini:

Code: Select all

[em_FastCopy]
cmd=%COMMANDER_PATH%\addons\FastCopy\FastCopy64.exe /no_exec /verify /open_window /cmd=noexist_only /estimate
param=%P%S /to="%T"
button=%COMMANDER_PATH%\addons\FastCopy\FastCopy64.exe
menu="copy folders or files using FastCopy"
Add to wincmd.ini in the section [Shortcuts]:

Code: Select all

C+F5=em_FastCopy
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6449
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: Is it possible to copy file symlinks as links?

Post by *Horst.Epp »

This is my version of [em_FastCopy]

A few notes:

1. The exe file of fastcopy is Fastcopy.exe for the x64 version
if you use the extract function of the installer in an x64 OS.

2. I use the /cmd=update function which also updates files in the target if they are older than the source
but prevents overwriting newer files in the target.

3. Using %WL for the source files allows large lists of files or dirs to be selected
not restricted compared to using %S.

Code: Select all

[em_FastCopy]
cmd=C:\tools\FastCopy\FastCopy.exe
param=/cmd=update /balloon=FALSE /log=FALSE /auto_close /srcfile_w="%WL" /to="%T"
button=%COMMANDER_PATH%\addons\FastCopy\FastCopy.exe
menu="Copy folders or files using FastCopy"
Windows 11 Home x64 Version 23H2 (OS Build 22631.3374)
TC 11.03 x64 / x86
Everything 1.5.0.1371a (x64), Everything Toolbar 1.3.2, Listary Pro 6.3.0.69
QAP 11.6.3.2 x64
User avatar
AntonyD
Power Member
Power Member
Posts: 1231
Joined: 2006-11-04, 15:30 UTC
Location: Russian Federation

Re: Is it possible to copy file symlinks as links?

Post by *AntonyD »

But if I understood it correctly - FastCopy - will NOT ask me about each possible overwriting case? Like TC does?
We know that special dialog is apperaing in this case - where I can click an appropriate command - like copy only
newer, compare both, skip one, skip all and etc.... So I can literally confirm each such case!
#146217 personal license
Post Reply