sync dir - compare by content

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
bun
Junior Member
Junior Member
Posts: 7
Joined: 2011-12-01, 07:55 UTC

sync dir - compare by content

Post by *bun »

sorry for this, but i can't make 'compare by content' in 'sync dir' work

2 identical files are in 2 dirs, the files differ only on the filenames (ie. same size & date)
the comparison tells that each file is unique, hence synchronizing the dirs results in copying

the help file says that the internal compare mode works just like 'Files -> compare by content - text mode'
the latter works as i expected

ps. can't yet post the image due to the rule, sorry
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Sync Tool doesn't allow to compare files with different names, it always treats them as UNIQUE, it doesn't search for file duplicates. Only files with same names may be checked for same size/date/contents.
bun
Junior Member
Junior Member
Posts: 7
Joined: 2011-12-01, 07:55 UTC

Post by *bun »

is there any separate module of TC for that purpose? or do you have another independent tool in mind to do that?
i've tried several tools that specialize on sync, but they too don't work as i expected (ie. similar to tc)
bun
Junior Member
Junior Member
Posts: 7
Joined: 2011-12-01, 07:55 UTC

Post by *bun »

i've found what i want in 'commands -> search', i think it's better to make 'find duplicates' available through 'sync dir' coz the functionality is already there, any plan? it's useful for people that don't mind about performance
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Sync Tool is designed to synchronize contents of folders (to make them equal), it doesn't designed to find duplicate files with different names or anything else. Theese tasks are absolutely different.

If you need to find file duplicates you may use Find Files dialog with corresponding checkbox, or any external tool for such task (I haven't used any).
User avatar
karlchen
Power Member
Power Member
Posts: 4603
Joined: 2003-02-06, 22:23 UTC
Location: Germany

Post by *karlchen »

Hello, bun.

A freeware programme which has been designed to find duplicate files which have the same content, but different names, is e.g. Clonespy.

HTH,
Karl
bun
Junior Member
Junior Member
Posts: 7
Joined: 2011-12-01, 07:55 UTC

Post by *bun »

@MVV
well, i beg to differ
1. sync DOES find duplicate files with diff modif timestamp
2. sync & search are NOT absolutely diff, in fact, they should share the same code up to the point where 0/more sets are produced, each contains 2/more files that are deemed identical according to selected criteria

suppose comparison in 'sync' behaves like in 'search', ie. identical files aren't necessarily in the same path relative to the root dirs compared
some situations & actions of sync:
1. 2 files in 2 synced dirs have the same vals for all properties including relative location, but differ in filename
> then comparison is set to use size & modif date as criteria of identical, which will find the 2 files as identical
> user then can choose these actions to sync the dir: delete both, rename one of them to match the other, rename both with a new filename

2. 2 files in 2 synced dirs have the same vals for all properties except relative path (ie. relative location & filename are diff)
> comparison is based on size & modif date, the 2 files are found identical
> these actions are available for sync'ing the dirs: delete both, make one of them in the same relative path as the other, assign new path for both

both situations aim to make the dirs' content equal
both situations are useful because changing filename & moving files are so common for most people, especially for exec, video, audio, image

such comparison is already used by 'search', only modif date is left out by 'search', that's what i meant when i said "the functionality is already there"
apparently comparisons in 'search' & 'sync' are implemented in diff code


i guess the diff of 'find duplicates' in 'search' & 'find duplicates' in 'sync' lies in their purposes; 'search - find duplicates' aims for deleting identical files, leaving 1 copy, on the other hand 'sync' wants to make identical files

like i said, there're several sync tools such as synkron, freefilesync, dirsyncpro, file synchronizer, & lots more, that claim to have the ability to handle file rename & move *correctly*, but they all behaves like tc, only copying files around
a tool named syncback apparently is intelligent enough to do it, but it's so bloated for software that only offers sync, lots of obsolete / superseded features
if you want to see how 'find duplicates' is related to 'sync' just look any documentation of these tools


@karlchen
that's one fine tool, too bad it's for eliminating duplicates, not embracing them :)
thanks


ps. sorry for late reply, kinda busy
User avatar
karlchen
Power Member
Power Member
Posts: 4603
Joined: 2003-02-06, 22:23 UTC
Location: Germany

Post by *karlchen »

Hello, bun.

Well, I guess that CloneSpy will ask for your consent before actually removing the found duplicates. Anyway, a definitely non-destructive alternative for finding files and duplicates, too, is this little programe by Nir Sofer: SearchMyFiles.
And of course, you can use the Find duplicates files options offered by the Total Commander Find Files function, as recommended by MVV.

Kind regards,
Karl
bun
Junior Member
Junior Member
Posts: 7
Joined: 2011-12-01, 07:55 UTC

Post by *bun »

no, i'm not complaining about CloneSpy auto-removing duplicates, in fact, automation of operations on duplicates is part of what i'm looking for, which also isn't provided by 'seach - find duplicates'

what CloneSpy lacks of is other operations on duplicates, such as renaming, it only provides removal of them

i'll see about SearchMyFiles
Thanks
bun
Junior Member
Junior Member
Posts: 7
Joined: 2011-12-01, 07:55 UTC

sorry

Post by *bun »

ouch sorry, i totaly forgot about this, blame it on aspire 4810T for not having a convenient way to control fan speed
===

SearchMyFiles is close to what i want, what it lacks is only an option to automate operations on the duplicates. here's roughly what i have in mind to extend its functions

I. search options
[global]
1. let's have another mode, 'tree mode': 'single' | 'multi'
$ in 'single', search is carried only on a single hierarchy, ie. only 1 folder is given as base folder
$ 'multi' searches duplicates of cross trees, it excludes duplicates in the same hierarchy
> eg. dir A contains file a & subdir B which has file b, dir C contains c,d,e
* in 'multi', the set of tuples to compare is {(a,c),(a,d),(a,e),(b,c),(b,d),(b,e)}

$ for 'multi', it's important to ensure that (1) any 2/more trees don't share any subtree, (2) each tree has no duplicates in itself


2. criteria of identical: size | hash | byte
$ the thing to compare. the latters supersede the formers


3. criteria of master copy:
$ these are the primary criteria to determine which copy is used as template
a. newer/older/ignore (modif date | create date | access date), default is newer for modif, the other 2 are ignored
b. attrs: on/off/ignore (hidden | read-only | etc), default is ignore

$ they are used conjunctively / disjunctively, & at least 1 criterion must be used
> in conjunction, all used criteria must be satisfied
> in disjunction, a copy needs to satisfy only 1 criterion, hence the order in which the criteria is tested is important. a default order is provided, but user can use a custom one


$ if in any way the primary criteria fail to determine the master copy, these secondary criteria is used
a. on/off user-specified order of tree (only for 'multi'). default is on & in the order the trees are given
b. prompt
c. skip processing the set of duplicates in which no master copy can be determined
Last edited by bun on 2012-01-02, 16:32 UTC, edited 2 times in total.
bun
Junior Member
Junior Member
Posts: 7
Joined: 2011-12-01, 07:55 UTC

Post by *bun »

II. options of operations on duplicates
[multi]
1. 'duplication mode': 'conjunction' (default) | 'disjunction'
$ a mode for whether to take all trees in conjunction / disjunction. this modifies creation of new copies

2. sync'ed properties
$ these are selectable props of the master copy to be propagated to existing & newly created copies: relative location and/or filename, various attrs, various security related props, the 3 timestamps, etc

$ if there's none selected, then
> existing duplicates are left as they are
> new duplicates have the same relative path as their corresponding master copies, other props are inherited from the folders to which they're copied (such as attrs, security) / copied from the master copies

3. 'delete mode': 'all' | 'leave one' (default)
> 'leave one': delete all copies except the master copy
> 'all': del all

4. 'fail-safe mode': 'prompt' | 'skip'
> it's for anything that can prevent the operations executed, such as already used path for new copy, not enough perm to perform an operation

===

III. available operations for the result set
[duplicate, multi]
> the result is 0/more sets, each consists of 2/more files, from diff folders, that are deemed identical
> actions:
(1) remove copies
(2) make copies. if 'duplication mode' = 'conjunction', make copies in all trees that haven't had ones, otherwise nothing's done
(3) propagate selected props of the master copy to other copies

> (2) & (3) can be chosen together, in this case (2) is done first, then (3)


[non-duplicate, multi]
> the results are files which don't have duplicates, in any other tree ('duplication mode' = disjunction) / in at least 1 other tree ('duplication mode' = conjunction)
> actions:
(1) delete copies
(2) make copies, if 'duplication mode' = 'conjunction', make copies in all trees that don't have copies yet, otherwise make a copy in 1 tree, determined by the order in which the trees are given
(3) propagate selected props to other copies

> (2) & (3) can be selected together, (2) first, then (3)
Post Reply