Copyurl same file name overwrite

What is the problem you are having with rclone?

When doing copyurl it automatically overwrites existing file on the remote without giving an error/warning.

What is your rclone version (output from rclone version)


Which OS you are using and how many bits (eg Windows 7, 64 bit)

W7 64

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


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

rclone copyurl url.webm remote:/"filename.webm"

A log from the command with the -vv flag (eg output from rclone -vv copy /tmp remote:tmp)

N/A ?

Basically filename.webm already exist on the remote. I want to be warned about this when doing copyurl, is there a flag that does this or something that I am missing? I've been searching for a bit and couldn't find anything. Thanks in advance!

Edit: I am using a crypted remote, does it change anything?

I think that would need a new flag for copyurl.

Fancy having a go at that?

I am not sure what I'd need or what exactly would you want me to do as I'm so new to this awesome piece of software.

If you'd want me to test something I'm up for it! Thanks

Edit: I don't want autofilename, I want to set a custom file name and if the destination already has the exact same file name to warn me or throw an error. I couldn't seem to find how exactly to achieve that

I was just wondering if you were a software developer and you'd like to contribute a flag to the copyurl command.

I was thinking of a flag like --no-clobber which when specified made sure copyurl didn't overwrite an existing file.

How does that sound?

If you like the idea please please make a new issue on github

Oh, I'm a computer science student, not even a junior. I like the idea and I feel like it would be useful for copyurl.

If I'll figure it out I could probably start an issue and if I feel even luckier I could contribute by trying to implement it, without even knowing where to start.

Thanks, that's what I neeeed to know, I thinked there was already a feature that I was not seeing. Guess your answer will be the solution.

Go is quite readable if you want to dive in and have a go!

Here is the source of the copyurl command:

You could add a new flag --no-clobber there and pass it on to operations.CopyURL

In there you'd want to check to see if destination exists if the noClobber flag was set by calling fdst.NewObject(dstFileName) and if no error and and object was returned then return an error.

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