Solved Move files command do not overwrite existing files

Status
Not open for further replies.

lejack02

New Member
Hi all,

Using the command used is the "move files" from "Utility - files management", I've done a robot that moves all the files from a folder (Let's call it A) (and it's thousands sub-folders) into another folder (let's call it B).

The files in folder A come to update the existing ones in the folder B.

So it works for the file that does not exist but NOT to overwrite the existing ones.

Do you know if there is a command : "If file exists, then overwrite" ?

Thank you very much.
 

anisjolly

Administrator
Hi @lejack02

To understand the full scope of this, is overwriting the files a Business requirement? The reason I ask that is that ideally you'd want to rename the file and then move it so there are no conflicts with existing files with the same name.

I usually use the following file naming convention to avoid such issues from arising: filename_ddmmyy_hhmmss.xlsx

However, if you're looking for something out of the box to 'overwrite' then I don't think there is a pre-built action, you'll have to create one yourself. It's just easier to rename the file and then move it.
 
Hi @lejack02

As @anisjolly said, there is no way to move and overwrite an existing file unless you can write a code for it. However, you can try the action stage "Copy File" from Utility-File Management. You can overwrite using the "copy file" and after that if you want you can delete the new file that you were trying to move.

Let me know if it works, although it worked for me.
 

cs.andras

Active Member
Hi @lejack02

As @anisjolly said, there is no way to move and overwrite an existing file unless you can write a code for it. However, you can try the action stage "Copy File" from Utility-File Management. You can overwrite using the "copy file" and after that if you want you can delete the new file that you were trying to move.

Let me know if it works, although it worked for me.

I'm going with this answer as well. You should copy and then delete, I've used copy before, it definitely overwrites existing files - given you have access.
 
Status
Not open for further replies.
Top