Re: using "mv" to transfer files. Force overwrite of dest files

Hi,
Thanks. I had hoped there was something else I had not spotted.
I already have that switch set in my script as well as "option batch on" but the only way I can get the dest file to be overwritten on the remote server appears to be if I add the -nopreservetime switch as well.
With this switch present the file is overwritten on the remote server and the -delete switch causes the local source file to be deleted as required. Otherwise dest file remains unchanged and source file remains in local folder.
I can use other products such as CoreFTP and the file transfers overwrite existing files on the same server without problems so I dont believe it is a specific remote server permissions issue.
Regards

Re: using "mv" to transfer files. Force overwrite of dest files

Am I correct that winscp in general using get, put, mget, mput etc does have a siwtch to allow you to force overwrite of destination files? If so can you confirm what it is?

Yes, put/get allow overwritting.

Yeeeeees? Ok..... but as per my origianal message HOW do you force winscp to overwrite? Please advise the switch or switches I need to add and provide a simple example as it isn't clear from any user guides I have seen on line how to do this.
Regards

martin

Re: using "mv" to transfer files. Force overwrite of dest files

2011-09-27

247FT wrote:

Am I correct that winscp in general using get, put, mget, mput etc does have a siwtch to allow you to force overwrite of destination files? If so can you confirm what it is?

Yes, put/get allow overwritting.

247FT

Re: using "mv" to transfer files. Force overwrite of dest files

2011-09-23 15:11

martin wrote:

How mv behaves is actually server and protocol specific. But in general, it cannot be used to overwrite files.

Hi,
Many thanks for your comment.
I would have though any file transfer program would need to support a switch to force overwriting of files in order to be to be really useful (assuming the server givs you permission to overwrite files) How strange!

Am I correct that winscp in general using get, put, mget, mput etc does have a siwtch to allow you to force overwrite of destination files? If so can you confirm what it is?
I have only found a reference to preserving time stamp that seems to relate to overwriting.

Regards

martin

Re: using "mv" to transfer files. Force overwrite of dest files

2011-09-23

How mv behaves is actually server and protocol specific. But in general, it cannot be used to overwrite files.

247FT

using "mv" to transfer files. Force overwrite of dest files

2011-09-22 14:29

Hi,
I am using a bat file to call winscp.exe using /script switch.
my script contains the command mv to move files from one remote folder to another remote folder on the same server.

mv works fine UNLESS
a) the destination files already exist in which case the equiv source files are not moved.

1. Is there any way when using the mv command to force the target files to always be overwritten so the source files are always "moved"?

I have tried adding the /nopreserve type switches to the mv commandline but without success.