How to delete from source when Duplicate object found in destination

Hey all, long time lurker here. I love rclone and couldn't live without it.
I mainly use move to push compressed backups.

I'm changing my workflow so moving to use moveto as I know there are going to be some existing directories on destination, though I'm still not 100% sure the different between move and moveto.

My problem is that I have edge-cases where the file will already exist on the remote and so I get the Duplicate object found in destination.

I'm wondering if there is a way to delete the file from source if it already exists on the remote?

When you hit the Help and Support, there is a template that helps us help you.

What version are you running?
What OS?
What Cloud provider?
What's the command you are running?

moveto is used for renaming files on from the source to destination
so move hosts to newhosts
if you use move, the names stay the same.

Apologies, I rushed into posting.

OS: unraid/linux
Version: V1.52.1
Cloud provider: cache > crypt > gdrive
Command: move/moveto

I want the names to stay the same.
What I'm trying to achieve is where the file already exists on the destination and matches, I want to delete it from the source, when I get Duplicate object found in destination

What's the actual command you are running though?
Are you copying from the cache remote?

If you have duplicate items in a folder, you need to fix that:

rclone dedupe is needed.

Ah, in this case, I'm actually going to the crypt not the cache.
Ohhhhhhh, is the error because there's a dupe on the remote, not my local vs remote. If that's the case, that makes more sense.
Will dedupe merge duplicate folders in gdrive?
rclone moveto -v --transfers=1 "/mnt/user/main/backups/" crypt:backups

On Google Drive, a duplicate would be in the a folder, two of the same file names.

Google allows for this. Most file systems do not and more importantly, rclone does not.

If you check out;

You can decide how you want to run it.

In your case above, I think move is fine as I've never used moveto for any of my workflow.

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