Topic "Commandline: cant skip a file that already exists autom."

Author Message
Unic.guest

Guest


hello, Iw ant to put files with winscp.com on a normal ftp-server. But i want that it only copy new files and skip existing files.

But if i use this script:

option batch on
option confirm off
open ftp://xxx:21
put e:\BackupServerD\Archiv\
exit

it will overwrite the existing files.

Maybe my english isnt good enought to understand but i have read :

By default an interactive mode is used (the user is prompted in the same way as in GUI mode). To switch to a batch mode (all prompts are automatically answered negatively) use the command option batch on. For the batch mode it is recommended to turn off confirmations using option confirm off to allow overwrites (otherwise the overwrite confirmation prompt would be answered negatively, making overwrites impossible).

I tought if i dont use the "option confirm off" it just will skip the file, but instead the script stops at the first existing file with a abordcommand. So, how can i automatically skip a file ?

the /syncronize option ist to slow for me, so i dont use it because winscp doent repeat if the connection is lost...

Maybe someone can help me...
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24555
Location: Prague, Czechia
Unic.guest wrote:
the /syncronize option ist to slow for me, so i dont use it because winscp doent repeat if the connection is lost...

What do you find slow about synchronization?
_________________
Martin Prikryl
Guest01

Guest


I have nearly the same question.

I run a schedule several times a day that syncs two directories.
But it may occure that one task is not finished yet when the second task starts.
So it may also occure that the processes want to upload the same file.
That process who finishes first is okay.
The second process then throws an error:
Error code: 11
Error message from Server (en-US): File already exists
Request code: 18
Abort Retry Skip Skipp all

Although i have activated the option confirm off this appears.

Is there a solution for that?
Guest01

Guest


Okay i just have to read the documentation a bit better Smile
option batch continue should solve the problem ^^
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License