What flag are you talking about? Maybe I am missing something but I have never heard about such option for duplicates.
The --suffix flag allows you to specify that, if a file would be overwritten by something in the copy, apply a suffix first. So if there were multiple copies of fileA.png and I used --suffix "-new", the first would be written as fileA.png and the second would be fileA.png-new.
It was brought up in another thread about this problem.
That doesn't help me though, given there are sometimes three or four files that have the same name, and the suffix is applied only once (if fileA.png-new already exists, it will overwrite it rather than generate fileA.png-new-new).
I was hoping there was a way to do something like what Chrome/Firefox do with downloads and apply a numbered suffix that incremented with each copy.
Do you want to preserve all duplicates? (as old1, old2 etc)
Yes, that's the goal - I'm trying to archive everything in the shared folder, and there are multiple images that have the same names.
Ahh OK. Got it now. Yes it only works for two copies.
This does not exist today but indeed it would be useful in cases like this.
But there is solution you can try.
rclone lsf --format "pi" drive: - this will give you list of all files with their full paths and unique gdrive IDs
Loop over the list from the previous step and copy files using their IDs - rclone backend copyid drive: ID dest_path. It can be simple bash script where you detect that dest_path already exist so you add prefix 1 - if exist too prefix 2 etc.
If you have a lot of files you can rclony copy everything first (duplicates won't be copied) and then use described method only to process duplicated files.