sahib / rmlint

Extremely fast tool to remove duplicates and other lint from your filesystem
http://rmlint.rtfd.org
GNU General Public License v3.0
1.91k stars 132 forks source link

Filter input - only files with same relative paths #550

Open james-cook opened 2 years ago

james-cook commented 2 years ago

Is there any way to filter input to allow only files with same relative paths through. Something like the existing --match-basename but for paths?

i.e. a duplicate file is only found if it shares the same relative path - with an option such as --match-dirname...

Pseudo code: rmlint <other options> --keep-all-tagged --match-dirname --match-basename DIR1 // DIR2

(This would only work/make sense with tagging I think, and --must-match-tagged would not be needed in this case as files must have the same relative path in any case)

ttyusupov commented 10 months ago

@james-cook , I've implemented something like this here: https://github.com/sahib/rmlint/pull/640