How to? ignore-existing folders

I'm trying to copy from one GDrive shared drive to a second. A lot of the folders in the two drives are identical but the files within them have been renamed or are just different. I'm looking for a way to ignore copying a folder, if it exists in both locations, rather than comparing individual files within. Is this possible?

Ex. Drive 1 copy to Drive 2
Drive 1:
/fold1/file.jpg
/fold1/file.png
/fold2/file.mkv
Drive 2:
/fold2/fileRenamed.mkv
/fold3/file.jpg

Final Drive2:
/fold1/file.jpg
/fold1/file.png
/fold2/fileRenamed.mkv
/fold3/file.jpg

So I would want fold1 to copy over but not fold2. The contents are different but only because they've been renamed on the second drive. The folders however, haven't been renamed so I want to use that as the way to decide what needs to be copied. Thanks

Good question...

How much data is it? How much is different between the drives?

I don't know how this could be done with filtering.

One solution is to script it outside of rclone, e.g. execute rclone ls on both drives and then compare and work out what do to with the script and then execute rclone copy, move, etc.. but may be some work to get it right.

Perhaps you can make something work with the --track-renames option.. :thinking: Is it an option "merge" back the content from Drive2 to Drive1 first? If Drive2 has the newer names you want to stick with, then maybe you could perform a copy from Drive2 to Drive1 with --track-renames, and then to get the complete content on Drive2 perform another copy, but from Drive1 to Drive2? Not sure if it would work, so take all necessary precautions - test with --dry-run, --interactive, -vv...! Depending on the existing content this may lead to two large transfers, and therefore not feasible?

Another alternative could be to just copy from Drive1 to Drive2, and then use rclone dedupe afterwards to remove duplicates. Perhaps better option than the one above, but again, its depending on your data set.

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