jdupes
jdupes copied to clipboard
Auto-delete only if file basenames identical (otherwise prompt)
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! :)
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?
Exactly.
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.
Thanks :)
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
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.)
I'm planning to generalize out this kind of thing in 2.0, so it'll be implemented independently of the actions taken.