Is there a way/flag to forcefully move and replace files on Google Drive?

What is the problem you are having with rclone?

Basically, I have created a backup of a bunch of files and for some silly reason, decided to use the backup to make modifications. The backup is on my Google Drive shared drive and the original files are on my ”My Drive” I essentially want to only have the original files moved over, so all the duplicated files from the backup are moved to the shared drive’s recycle bin.

When I use the rclone move command, it instead just moves the original files to the bin because they’re “the same.” What I want is for the backup files (duplicated copy) to be moved to the shared drive recycle bin, then for the original files to be moved over. This is mainly important for any Google documents as on the backups/duplicates/clones using rclone copy command, it essentially only copies what’s currently on the document and doesn’t copy all the documents’s version history info.

Run the command 'rclone version' and share the full output of the command.

rclone v1.58.1

  • os/version: Microsoft Windows 10 Pro 21H2 (64 bit)
  • os/kernel: 10.0.19044.1865 (x86_64)
  • os/type: windows
  • os/arch: amd64
  • go/version: go1.17.9
  • go/linking: dynamic
  • go/tags: cmount

Are you on the latest version of rclone? You can validate by checking the version listed here: Rclone downloads
--> No

Which cloud storage system are you using? (eg Google Drive)

Google Drive (both My Drive and Shared Drives)

The command you were trying to run (eg rclone copy /tmp remote:tmp)

rclone move original:files/group1 shareddrive:files/group1

A log from the command with the -vv flag


Hi JWHero123,

Not sure I fully understand your situation and not a Drive expert, but did you consider/try something like this

rclone sync modifiedBackup: originalData:
rclone sync originalData: modifiedBackup:

This will make both the same and then you can delete the folder you don't want to keep.

Please be careful. Try on a a small set of testdata and always use --dry-run when trying a new sync - it may delete files in the target.

PS: you can force copy/sync of all files with --ignore-times

not exactly. I want the exact ORIGINAL files to be moved over, not copied or synced. Google Drive has the capability to move the exact file across different folders, but you can't move folders from My Drive to Shared Drives directly if it's not in the same domain. However, rclone sometimes creates the folder manually and then moved the file server-sided instead. Reason being is because there are multiple Google Doc files that when copied/duplicated/synced, the destination does not have document modification history, only on the original. For this instance, I have two folders holding the some original files, and the 2nd folder has a backup of those files and additional files I have added later. I essentially want to merge these two folders, but keep the original files and delete the backup so I can retain google document history and other history dates data.

Sometimes whilst using the rclone move command I also run into issues where it doesn't do a server-sided move, but instead copies. I was also wondering if there was a way/flag to only move, and not copy and skip anything that needs to be copied.

OK, this is complicated and a big mouthful. I therefore propose we try to solve it in these smaller steps:

Identification of modified files (the easiest 80%)

If nothing changed in the originals then I guess you will be able to identify the modified files in the backup with a command like this:

rclone check modifiedBackup: original: --differ=modifiedfiles.txt

Description and extra flags: rclone check

Moving modified files (the easiest 80%)

I guess you can do it with a command something like this:

rclone move  modifiedBackup: original: --files-from=modifiedfiles.txt

Description: rclone move
Description of --files-from: Rclone Filtering
List of all global flags: Global Flags

Gradual refinement of the above to handle exceptions, special cases, etc. (the hard 20%)

This step probably involves a closer look at the Google Drive Advanced Options combined with input from the Google Drive/Documents experts in the forum.

I would like to postpone this step until we have a solid grip on the 2 steps above.

Deleting non-modified files, copying/moving to different folders/drives, etc

I would like to postpone this step until we have a solid grip on all of the above.

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