Post a reply

Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)


Topic review


4 years have passed. Strange but failonnomatch off doesn't work too when I use rm to remove nonexistent file.

I don't understand how to move file with overwriting. Dest file can be exist or not.

Upd. I solved it adding * to filename so failonnomatch started working.

Moving files from one remote folder to another while allowing overwriting

I am trying to move files from one remote folder to another remote folder. I am using the mv command and it works fine. The only problem is when there are old files in the destination folder (to be more specific: duplicates of the ones in the source folder), it does not overwrite (or simply skip) those files. The file I want to move still exists in the source folder. The remaining files in the source folder (other than the one that has a duplicate in the destination) also cannot be moved because of this.
I have seen that synchronize local / remote can be used for get / put to overwrite files like this. But I could not find a solution to use for the mv command.
I also tried (instead of using the mv command) copying and then deleting the files between the remote folders, but I couldn't find a command for copying files between remote folders.
Is there a way to solve this?