Topic "Which "option batch" value to use in order selecting the "Retry" option ?"

Author Message
PlanetIrata

Guest


Hi, I'm using the synchronize command and it seems that ther is no "option batch" value that will select "Retry" when a file upload fails :

- If I use "option batch continue", the script will choose "Skip" and synchronize command continue without reporting the upload error in the XML log.

- If I use "option batch on", the script will stop when the file upload fails, and report an error.

Is there a "option batch xxxxx" that could select the "Retry" choice in synchronize when an upload error occurs ?

Thanks.
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 26462
Location: Prague, Czechia
"upload error" is too broad description. What specific error are you getting?
Note that there's no way to make WinSCP retry on any possible error.
Guest




martin wrote:
"upload error" is too broad description. What specific error are you getting?
Note that there's no way to make WinSCP retry on any possible error.


Here is an "upload error" sample log when a big file transfer fails and can't be resumed because the APPE command is not supported :

Code:

_media\atd-distribution081310-spellchecker-server.tgz       |      73504 KiB |   76,0 KiB/s | binary |  69%
Lost connection.
Disconnected from server

Copying files to remote side failed.
(A)bort, (R)econnect (5 s): Reconnect
Connecting to ftpperso.free.fr ...
Connected with ftpperso.free.fr. Waiting for welcome message...
Connected
Starting the session...
Reading remote directory...
Session started.
_media\atd-distribution081310-spellchecker-server.tgz       |      73584 KiB |   77,0 KiB/s | binary |  69%
_media\atd-distribution081310-spellchecker-server.tgz       |            0 B |    0,0 KiB/s | binary |   0%
Error transferring file '_media\atd-distribution081310-spellchecker-server.tgz'.
Copying files to remote side failed.

'APPE': command unrecognized.
(A)bort, (R)etry, (S)kip, Ski(p) all: Skip


WinScp choose "Skip", and do NOT log any error in the XML log file. It would be very useful to have these improvements :

- an option to say to WinSCP to (R)etry at least 3 times (for instance)
- if the failure persists after 3 tries, having a <result success="FALSE" /> in the XML log file (for now the failed upload do not appear anywhere in the XML log file).

Thanks.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 26462
Location: Prague, Czechia
Quote:
- an option to say to WinSCP to (R)etry at least 3 times (for instance)

Retrying unsupported command does not help.
You have to tell WinSCP no to try to resume at all using -resumesuport=off
https://winscp.net/eng/docs/scriptcommand_put#resumesupport

Quote:
(for now the failed upload do not appear anywhere in the XML log file).

That happens with the option batch continue more only, right?
Guest




Thanks Martin, yes I use option batch continue.

I tried adding -resumesupport=off to synchronize command, and it now retries to upload a file from start when disconnected. It is a more predictable behavior, but the best of both world would be a sort of --resumesupport=auto that would use on if the APPE is supported, and off if not, depending on the server capabilities.

Do you think it's possible ?
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 26462
Location: Prague, Czechia
Will see if more people ask for this.
Guest




martin wrote:
Will see if more people ask for this.


Thanks anyway for your great work !
Advertisements

You can post new topics in this forum






Search

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