Dedupe by filename ignoring paths?

I have files with the same name, different hashes (because they are indeed different files) but different paths.

Is there a way to have rclone delete the older file and keep the newest?

rclone dedupe would need some options like --track-renames has

  --track-renames-strategy string   Strategies to use when synchronizing using track-renames hash|modtime|leaf (default "hash")

I should really unify the two bits of code as they do the same thing...

Anyway, short answer - you can't do this directly with rclone.

However you can do stuff with rclone lsf which will help - you'd use something like

rclone lsf -R --files-only --format "ptp"  remote:path | sed 's/^.[^;]*\///' | sort

This will get you a list files sorted by name showing time and full path.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.