Synchronization issue - Can't overwrite file

Advertisement

Guest

Synchronization issue - Can't overwrite file

Hello!
I am scripting a local directory to remote sftp sync. The local source will be changing and the remote sftp destination should always mirror the source exactly.

Script:
option batch continue
option confirm off
open xxx
option transfer binary
synchronize remote \\xxx\yyy\zzz /aaa/bbb -mirror -nopermissions -delete


The sftp server is not allowing changed source files to overwritten as it's against our company policy. When the file sync tries to upload a changed file it fails and continues per the options I have set. If I change the batch option so that I'm prompted to "(D)elete the file", I can answer D obviously and the equivalent of an overwrite occurred, script continues.

MY QUESTIONS:
A) In a put or synchronization operation, is there a way to tell WinSCP to delete a file before uploading a newer version? The overwrite is a 1 step operation to do this, but I need a 2 step delete then put as mandated by our company.
B) Alternatively, is there a way to tell the synchronize command to automatically answer D when prompted?

I am willing to run a beta copy if this functionality is not currently possible but a "2 step overwrite" or "automated prompt answer" switch can be added.

Thanks for your help everyone!
-Mike

Reply with quote

Advertisement

Advertisement

You can post new topics in this forum