jdupes icon indicating copy to clipboard operation
jdupes copied to clipboard

Auto-delete only if file basenames identical (otherwise prompt)

Open igittigitthub opened this issue 9 years ago • 7 comments

Hello,

I would like to ask for a feature. I would like to delete automatically a file, which has the same filename and the same checksum like another file. If the checksums are identical but the filenames differs, I want to decide which file should be deleted.

Thanks! :)

igittigitthub avatar Jan 26 '16 15:01 igittigitthub

To clarify: you want to be able to specify that matching files which have the same base file name (i.e. abc/001.jpg and xyz/001.jpg) should be auto-deleted while files with different base names (i.e. abc/foo.jpg and xyz/bar.jpg) should be prompted for deletion?

jbruchon avatar Jan 26 '16 16:01 jbruchon

Exactly.

igittigitthub avatar Jan 26 '16 16:01 igittigitthub

At the moment this is a low-priority feature request but I am leaving it open as a reminder so I can add it in the future.

jbruchon avatar Feb 27 '16 02:02 jbruchon

Thanks :)

igittigitthub avatar Feb 27 '16 17:02 igittigitthub

I'd like to +1 this feature request, togather with the --noprompt would be ideal (instead of prompting when filename does not match) as running jdupes twice would be a sufficient workaround in that case

maysara avatar Jul 15 '17 00:07 maysara

To make this less use-case-specific, how about an option that requires basenames to be equal? So jdupes --same-basename --delete --noprompt would be non-interactive (and perhaps quicker since it can filter files on basename first?)

(My own use case is that during backups with rsync onto a btrfs drive, folders some times have been moved since the last snapshot, so I dedup with older snapshots – it's a bit pointless in that case to check file-pairs that don't have the same basename.)

unhammer avatar Aug 23 '18 20:08 unhammer

I'm planning to generalize out this kind of thing in 2.0, so it'll be implemented independently of the actions taken.

jbruchon avatar Aug 23 '18 20:08 jbruchon