Commandline: cant skip a file that already exists autom.

Advertisement

Unic.guest
Guest

Commandline: cant skip a file that already exists autom.

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...

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
28,096
Location:
Prague, Czechia

Re: Commandline: cant skip a file that already exists autom.

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

Reply with quote

Guest01
Guest

Skip files automatically

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?

Reply with quote

Guest01
Guest

Skip files automatically

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

Reply with quote

Advertisement

You can post new topics in this forum