jdupes
jdupes copied to clipboard
Set order by full path depth?
Is there any way to set the order of results by the path "depth" of the item? So that deeper items get deleted first?
I.e., given
a/bb/ccc/foo
b/cc/foo
c/dd/eee/fff/foo
I want to keep b/cc/foo and delete the rest, because it's closest to root folder.
If you are on Linux/Mac or can use the MSYS2 environment on Windows, this would be a good use for a custom shell script; there is a directory of example scripts with plenty of documentation in the source code. What you need to do is count the number of slashes, then sort by that count. Watch out for relative paths. Stack Overflow is your friend.
I could possibly add this as a feature in the future. I'll leave this open.