How to avoid re-transferring renamed extensionless files with rclone copy?

What is the problem you are having with rclone?

I use rclone copy to back up files from a read-only Google Drive Shared Drive to MEGA.

Many source files lack file extensions (e.g., A Gentle Reminder, relying on Drive's internal MIME type). When copied to MEGA, an external script detects their MIME type and appends the extension (A Gentle Reminder → A Gentle Reminder.pdf).

On the next cron run, rclone copy looks for the original filename without extension (A Gentle Reminder). Since only A Gentle Reminder.pdf exists on MEGA, rclone treats the file as missing and re-transfers it (Copied (new)), causing duplicates on MEGA:

A Gentle Reminder
A Gentle Reminder.pdf

Because I have read-only access to Google Drive, I cannot rename the source files.

Questions:

  1. Is there an rclone flag/feature to append extensions from Google Drive MIME types during transfer?
  2. Can rclone match extensionless source files against renamed files on the destination to avoid re-transfers?
  3. What is the recommended way or filter pattern to handle this without duplicate transfers?

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

rclone v1.75.2
- os/version: Microsoft Windows 11 IoT Enterprise LTSC 2024 24H2 24H2 (64 bit)
- os/kernel: 10.0.26100.9711 (x86_64)
- os/type: windows
- os/arch: amd64
- go/version: go1.26.9
- go/linking: static
- go/tags: cmount

Which cloud storage system are you using?

  • Source: Google Drive (Shared Drive, read-only)
  • Destination: MEGA

The command you were trying to run

rclone copy "gdrive,root_folder_id=SHARED_FOLDER_ID_XXX:" "mega:backup" \
    --fast-list --transfers 4 --checkers 8 -vv

Please run 'rclone config redacted' and share the full output.

[gdrive]
type = drive
client_id = XXX
client_secret = XXX
scope = drive.readonly
token = XXX
team_drive =

[mega]
type = mega
user = XXX
pass = XXX
session_id = XXX
master_key = XXX

A log from the command that you were trying to run with the -vv flag

2026/10/25 12:20:13 DEBUG : rclone: Version "v1.75.2" starting with parameters ["rclone" "copy" "gdrive,root_folder_id=SHARED_FOLDER_ID_XXX:" "mega:backup" "--fast-list" "-vv"]
2026/10/25 12:20:14 DEBUG : mega root 'backup': Using previously stored session ID and master key to initialize the Mega API
2026/10/25 12:25:03 DEBUG : Checks: 321 / 321, 100%
2026/10/25 12:25:03 DEBUG : Transferred: 0 / 937, 0%
2026/10/25 12:25:14 INFO  : A Gentle Reminder: Copied (new)
2026/10/25 12:25:28 INFO  : Cece's Part 1: Copied (new)
2026/10/25 12:25:29 INFO  : Cece's Part 2: Copied (new)
2026/10/25 12:25:32 INFO  : Communicable Diseases: Copied (new)
2026/10/25 12:26:38 INFO  : (3rd Edition) Medical Surgical by UDAN: Copied (new)

Files already exist on MEGA as A Gentle Reminder.pdf, but rclone re-transfers A Gentle Reminder because of the extension mismatch.

SS taken from mega

welcome to the forum,

just an idea, to run rclone as a remote control api server

  1. get a list of source files.
  2. for each source file, check if the corresponding dest file exists or not.
  3. decide to copy+rename the source file to the dest.

Once your script renames the destination file, its path no longer matches the source path. A later rclone copy can therefore transfer the source file again even though the renamed copy is still there. The documented --drive-export-formats setting is for exporting Google documents, rather than adding MIME-based extensions to ordinary binary files. Could you share the exact copy command and the part of the script that adds the extensions? Any workaround needs to handle changed source files too; checking only whether a renamed destination file exists could leave you with an outdated copy.

Thanks for the replies! Just to clarify, I'm using the exact command mentioned above and just swapping out the source and destination for my 10+ folders.

Because I only have read-only access to the Google Shared Drives, I can't rename or modify the files on the source side. The external script runs afterward to fix the extensions on the destination side only. I know that since the names don't match Google Drive anymore, rclone thinks the file is missing and triggers a duplicate transfer. Since I can't change anything on Google's end, I'm looking for the best way around this limitation.
Here is the python script that i use : #!/usr/bin/env python3

Thanks! I'll take a look into the API server, I've never used it before, so I'm not entirely sure how it works or how it will fit into my workflow yet

well, it would be the same as your python script, but should be much more performant.

in your case, each rclone moveto requires the overhead to start new process via subprocess.run

using Rclone implements a simple HTTP based protocol
each moveto operation would be a simple requests.post(url, json = myjson)

Thank you, i will now adapt my workflow to this and let you know if i have any issue, thanks again for the help!