Topic "Script tries to reconnect instead of abort"

Author Message
JeroenE
[View user's profile]

Joined: 2014-02-13
Posts: 6
Location: The Netherlands
I have a script which uploads files to an FTP server.

Sometimes the server is flaky and the upload doesn't work. I can't change that (it's not my server) and I can accept if the upload fails. However, for some reason WinSCP tries to reconnect to the server instead of aborting.

I would like to abort this reconnection automatically or after some time so I know this has failed. Now winscp is just retrying this endlessly. Because I'm waiting on the result everything else is waiting until someone comes along and chooses abort.

This is how the script is started:
Code:
winscp.exe /console /timeout=60 /xmllog="mylogfile.xml" /script="myscript.script"

This is the contents of the script file:
Code:
option batch abort
option confirm off
open -passive=on FTP://user:password@ftpserver
option transfer binary
option batch abort
option confirm off
put -delete "C:\directory\myfile" "/remotedirectory/"
exit

Attached a screen shot to show what is happening on the screen.

I had assumed that the "option batch abort" would choose automatically for the abort option, but it chooses reconnect instead. Am I missing some setting or is there some way to abort these retries?
reconnect.png (9.13 KB)

Description: (none)

reconnect.png

martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24552
Location: Prague, Czechia
Use option reconnecttime X to limit the retries to X seconds.

Though note that the latest version of WinSCP defaults to 120 seconds.

So maybe you just need to upgrade.
JeroenE
[View user's profile]

Joined: 2014-02-13
Posts: 6
Location: The Netherlands
Thanks, we'll try the latest version and set the reconnecttime in the script.
Unfortunately this is difficult to test as we are depending on a remote server not workign as it should Rolling Eyes
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