Synchronize Dirs, to Hardlink (or Symlink) or MOVE Files

Here you can propose new features, make suggestions etc.

Moderators: Hacker, petermad, Stefan2, white

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

Synchronize Dirs, to Hardlink (or Symlink) or MOVE Files

Post by *Balderstrom »

While trying to organize files and directories it would be much more time effective to have the ability to create hardlinks instead of copying files.
In addition an option to MOVE the files instead of copying would be well appreciated.

So the Sync dialog where you choose where the files will be copied could have an Advanced Toggle/DropDown to allow selection of:
[x] Move Files (or) [x] Create Hardlinks (or) [x] Create Symlinks.
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Hardlink is a dangerous piece of stuff. If you change 'copied' file, original one will be changed too. Also hardlinks can't be made between volumes.
User avatar
Balderstrom
Power Member
Power Member
Posts: 2148
Joined: 2005-10-11, 10:10 UTC

Post by *Balderstrom »

Maybe the russian and canadian definition for dangerous is different?

I would say that sounds like the hardlink is working as it's supposed to and is convenient --- not dangerous.

Further, since TC wont parse Symlinks - as far as comparison within the SyncTool is concerned, then your only option are hardlinks when attempting to organize large quantities of files.

Without using hardlinks, during an intial organization phase:
You would have to either:
1) Move the files from the current location - to the same volume
--- Losing the original file structure.
2) Copy the files in question
--- Waste excessive amounts of time for the unneccessary duplication of files.

With hardlinks:
1) Extremely fast duplication, that can further be compared to the original folder structure.
With symlinks (in TC) :
1) Extremely fast duplication, that CANNOT be further compared to the original folder structure.

Further, TC's SyncTool can't compare something like this:
\TestFile1\TestFile1.txt
\TestFile2\TestFile2.txt
vs
\TestFile1.txt
\TestFile2.txt

With files in subfolders the SyncTool CANNOT compare those files at all. Yet if we hardlink the Flattened (SubDir branch view) of those files. Then we have a list of files that CAN be compared to the latter.

In cases with only a few files, you would just flatten and copy them to an alternate folder to compare to the latter... but in cases with thousands (or more) of files that would be a complete waste of time when one could use hardlinks instead.

Now if TC had the option to PARSE symlinks during comparison (which I have requested as well), then a lot of usage that force the usage of Hardlinks within TC could be obviated and replaced with the less "dangerous" symlink.
*BLINK* TC9 Added WM_COPYDATA and WM_USER queries for scripting.
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

I mean that using hardlinks may be dangerous if you don't understand them:) with such option in GUI someone may accidentially enable it and then get some troubles...
With symlinks (in TC) :
1) Extremely fast duplication, that CANNOT be further compared to the original folder structure.
Why cannot? Symlinks/junctions are usually processed just like regular folders (w/o enabled SyncIgnoreJunctions INI option).
User avatar
Balderstrom
Power Member
Power Member
Posts: 2148
Joined: 2005-10-11, 10:10 UTC

Post by *Balderstrom »

I don't have SyncIgnoreJunctions enabled.
(And if I did, it shouldn't affect symlinks)

TC's SynchronizeDirs:

TestFile.txt 10kb 2012/11/11 != TestFile.txt 0kb 2012/11/15

Blue is a symlink.
TC considers the symlink (in all cases) not equal to the file it is symlinked to.
Copy C:\TEMP1\TestFile.txt to C:\TEMP2\TestFile.txt
Symlink C:\TEMP2\TestFile.txt to: C:\TEMPS\TestFile.txt

Compare C:\TEMP1 vs C:\TEMP2 ... Files will be equal.
Compare C:\TEMP1 vs C:\TEMPS ... Files will NOT be equal.
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Ah, you're talking about file symlinks, not folder symlinks... I don't use them at all because they don't show original date/size of a file.
User avatar
Balderstrom
Power Member
Power Member
Posts: 2148
Joined: 2005-10-11, 10:10 UTC

Post by *Balderstrom »

Thats just a flaw of the symlink creation tool. One could pretty easily "touch" the newly created symlink to match the source dates.

Most of my symlink/hardlinks/etc are created in batches. Though if I was doing an individual one -- I'd probably do it via AHK/or CMD so that after running the tool to create the symlink, I'd then touch the file to the proper date.
*BLINK* TC9 Added WM_COPYDATA and WM_USER queries for scripting.
newlight
New Member
New Member
Posts: 1
Joined: 2012-11-24, 06:59 UTC

Post by *newlight »

Hmm, I think this should be a basic feature that all file managers should implement. You can't expect someone to enter in the command prompt or to make a batch file only for creating a symbolic link or junction.

For example if you have a folder tree with music albums and you want to copy in another folder just a selection from those mp3's, you will have to waste a lot of space in order to copy them. But if you just create symbolic links (or junctions - for folders), that's a great thing. Then you can have separate folders for "Disco" or "Rock" music without wasting vast amounts of disk space.

Symbolic links are the main reason why I prefer Windows 7 over Windows XP.

Or if you have a bunch of movies, arranged in folders sorted by the producers (for example D:\Movies\Dreamworks D:\Movies\Pixar etc.) you might want to create a folder where you arrange movies by release date like D:\Animations\2007 , D:\Animations\2008 , D:\Animations\2009 , etc.
So you want more "views" for the same collection of files. And what is the solution then, to copy of 300 GB of files just to have another view? Camon. And then, when you update a file (better resolution, frame rate, etc.), you have to update it in all the places where you keep copies of it? Wow! That's extreme.

I know that Total Commander has sophisticated copy options so this one should be integrated too as soon as possible, to keep it on top.

It's no problem if the junctions/symlinks have to be on the same disk drive. Because it's simply easier to keep all the views for a set of data in the same place.

Or at least, can you implement a feature to create a text file with the name of the files/folders you selected (full path and a flag if it's file or folder), so you can speed the symbolic link creation process with a batch file?

Thanks
Post Reply