copy reparse points as is -- not their contents

Here you can propose new features, make suggestions etc.

Moderators: white, Hacker, petermad, Stefan2

User avatar
Balderstrom
Power Member
Power Member
Posts: 2148
Joined: 2005-10-11, 10:10 UTC

Post by *Balderstrom »

If we have:
C:\Temp\FooLink.txt --> C:\Orig\FooSource.txt

I copy C:\TEMP to D:\BAK, so I now have D:\BAK\TEMP\FooLink.txt
Which points to C:\Orig\FooSource.txt ...

If FooLink.txt is a symlink, then it points to C:\Orig\FooSource.txt
No matter where FooLink.txt is, it still points there.

The fact that it is still a symlink after being copied is to be expected... but if you feel its not expected, TC could notify the user at the end of the Copy Routine that:
There are symlnked files, Replace with Source?

Or something similiar. And/Or have a few checkboxes on the CopyDialog so defaults for handling Junctions/Links can be changed/set. Hide the options by default if so desired. Make the options by default work as TC does now. Then users that don't "get" Links/Junctions will not be bothered by them and will duplicate data like they expect to.
*BLINK* TC9 Added WM_COPYDATA and WM_USER queries for scripting.
Đonny
New Member
New Member
Posts: 1
Joined: 2009-11-15, 23:06 UTC
Location: Prague
Contact:

Post by *Đonny »

I think current default behavior of TC when copying Symlinks etc. is OK. It would be however nice to have an option somewhere (in the dialog, special command) to change it.
I'd appreciate if we have option to create symlicks, hardlinks etc. from within Total Commander. E.g. option in F12 dialog - create lnk/symlink or hadrlink. It also would be nice to have option to create symlink with relative path and to change symlink target.
I use Shell Link Extensions to work with symlinks. I also wrote my own utility tor some batch operations (e.g. convert *.lnks to symlink and vice versa).
schinagl
Junior Member
Junior Member
Posts: 2
Joined: 2010-04-18, 08:49 UTC

Post by *schinagl »

:)Some read my (Linkshell Extensions) docu very well. Well if needed for sure I can think of useage of my delorean and smartcopy code in TC. It is all capsuled in a static library, compiles with Vs2005, and does most of the ugly jobs needed to tackle with symlinks/junctions/ whatever

The SmartCopy/Delorean calls can be run async, which means the force a dialog box, to pop up. LSE uses the calls like this. If run sync no progress comes up, and this is the way my ln.exe usese the same functioanlity.

All the usescases from my website come because during development you run into very interesting algorithmic problems.

Or if you would like to write from scratch, also fine I could assist in avoiding run in pitfalls. The only thing I can tell from the experience I gained during the last few years, is that if I knew all those pitfalls in advance I would not have developed it:)

Anyway feel free to contact me:) I am willing to help.

[quote="Balderstrom"]There aren't many more similiar problems.
There are basically two types of junctions/symlinks:
1) Inner Links
2) Outer Links
mas912
Junior Member
Junior Member
Posts: 6
Joined: 2012-03-15, 10:52 UTC

Post by *mas912 »

I have some problem — i *cannot* copy without link contents.
I think, solution of "what user mean" problem, described above, is just a copy option (checkbox): "copy symlink contents" as FAR does.
JFierce7
Senior Member
Senior Member
Posts: 212
Joined: 2005-07-17, 10:47 UTC

Post by *JFierce7 »

Here's another vote for such a feature:

I've got a backup of a certain PC's drive c, made with FastCopy or TeraCopy.

The backup contains x:\users (as well as x:\documents and settings linked to c:\users), which contains a couple of more junctions ("all users" linked to c:\programdata, "default user" linked to c:\users\default, several "deeper" junctions for appdata a.s.o.).

When I copy this backup from hard disk to hard disk, it doesn't make any sense, to copy the *current* c:\users for "documents and settings". This would be even copied twice, since there's an additional "dokumente und einstellungen". Also it could be possible to ignore "documents and settings" as well as "dokumente und einstellungen", but there are lots of other junctions hidden in the directory structure.

Hence, TC would need some configurable behaviour how to deal with junctions/symlinkd.

Probably all arguments against this proposal as found in postings above, could be raised for moving files as well. However, luckily, TC moves junctions and symlinkd correctly. So why keep this inconsitent behaviour?
User avatar
LonerD
Senior Member
Senior Member
Posts: 381
Joined: 2010-06-19, 20:18 UTC
Location: Makeyevka, Russia
Contact:

Post by *LonerD »

UP ))
Some utilities like FastCopy can do it.
But it strange use sided tools for work with files when we use FILE manager.
"I used to feel guilty in Cambridge that I spent all day playing games, while I was supposed to be doing mathematics. Then, when I discovered surreal numbers, I realized that playing games IS math." John Horton Conway
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6495
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Post by *Horst.Epp »

LonerD wrote:UP ))
Some utilities like FastCopy can do it.
But it strange use sided tools for work with files when we use FILE manager.
Its strange that you don't even read the help from actual TC.
Here the description of the related ini file entries:

CopyLinks=0 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

IgnoreLinks=0 Allows to ignore hard links (junctions, reparse points) to directories in various functions. Note: The function "Synchronize dirs" uses a separate option "SyncIgnoreJunctions".
Sum of:
1: copy/move/calculate occupied space
2: internal packers (zip, tar)
4: branch view
8: find files, re-scan tree
16: ignore links even when they are selected in the current directory. Otherwise only links in selected subdirectories are ignored.

-> Link now points to d:\trgpath1\trgpath2\path2\linktarget
Note: The function does NOT check whether the target of the link exists or not.
Post Reply