pauldreik / rdfind

find duplicate files utility
Other
951 stars 77 forks source link

request for option to avoid detection of duplicates within same source tree #120

Open brainchild0 opened 1 year ago

brainchild0 commented 1 year ago

Presently, the application applies multiple criteria to rank files with a group of duplicates, but once the criteria are applied, ranking occurs along only one dimension. As such, no distinction is given between files detected as duplicates from within the same source tree (i.e. command-line argument) versus across different ones.

Requested is an option that would allow files to be kept as candidates (i.e. targets for deletion or other action) only if a duplicate appears from within a different source tree having a higher ranking than the tree containing the file considered for selection. That is, with the option applied, in order for any particular file to be identified as a duplicate and targeted for action, it would be insufficient simply to detect a duplicate file within the same source tree.

Through such a change, each source tree would be ranked relative to others (based on command-line ordering), and this particular ranking, of the entire tree, must be propagated to all descendants, and preserved for them independent of other ranking criteria. All files sharing this rank within a group of duplicates are subject to the same action.

Naturally, the consequence would be completely preserving the top-ranking tree (the one given first on the command line), even if it contains internal duplicates. Hopefully such an observations helps illustrate the reasons that the requested option might be desirable for certain use cases.

GimmeSoftwares commented 1 year ago

I echo the above comment. I came here looking for this exact enhancement.

SimonMcN commented 1 year ago

Me too :-)

chrisulbrich commented 1 year ago

I would like to have this feature, too. I have some directory structures which need to have duplicates but I try to clean up backup copies in other sources.