Topic "Abort on Error - same result with all "option batch" options"

Author Message
DanielGow
[View user's profile]

Joined: 2012-04-24
Posts: 2
Hello,

I am running WinSCP version 4.3.7, and I have the following script:

option batch abort
option confirm off
open ftps://<user>:<password>@<host> -implicit -certificate="<...>"
put "D:\Transfer\WinSCP\text.txt"
exit

The put commnd is currently failing due to a network configuration issue on our target server (our problem, definitely not WinSCP's), and when it fails, WinSCP prompts for: "(A)bort, (R)econnect". No matter what combination of "option batch" and "option confirm" I use, it will always Reconnect if no response is provided. If run without the console, via WinSCP.com, again it chooses Reconnect every time.

Is there a way to force it to Abort on error? If left alone, the script just continues to Reconnect, presumably forever. We want the command to Abort on error by default, instead of Reconnect.

Thank you,
Dan
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
Do you get the prompt for open or put? If for put, try
option reconnecttime off
https://winscp.net/eng/docs/scriptcommand_option
_________________
Martin Prikryl
DanielGow
[View user's profile]

Joined: 2012-04-24
Posts: 2
It was definitely on the put command, open was connecting and opening the session without any trouble. It's also only in the situation where put fails on a timeout. Put failing due to other reasons will abort with "option batch abort", but timeouts were causing it to reconnect. I'll give "option reconnecttime off" a try.

Thanks!
Dan
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
prikryl wrote:
Do you get the prompt for open or put? If for put, try
option reconnecttime off
https://winscp.net/eng/docs/scriptcommand_option

This answer was actually wrong, you need to set option reconnecttime to show interval instead.
_________________
Martin Prikryl
AaronO

Guest


Hello everyone,

I'm also having a similar issue. With version 5.5.3:4214 I'm seeing that no matter if I have "abort" or "continue" or anything else, it will always try to reconnect. I've used "option reconnecttime 1" as an interval, because I want it to abort.

It does, indeed, try forever. My log file was about 6GB. Smile

Is there another way to "on error abort"? I do not wish for it to try to reconnect at all... the scheduler will try to rerun the batch at a later time anyway.

Attached, I have a screenshot of my batch file run manually. If I punch in an "A" at the right moment, it will abort and exit. If not, it will continue running into perpetuity... or until the network connection gets fixed.

Thanks!
Aaron
Capture_Final.PNG (24.8 KB) [Download]

Description: Screenshot of reconnection

martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
AaronO wrote:
I'm also having a similar issue. With version 5.5.3:4214 I'm seeing that no matter if I have "abort" or "continue" or anything else, it will always try to reconnect. I've used "option reconnecttime 1" as an interval, because I want it to abort.

It does, indeed, try forever. My log file was about 6GB. Smile

Is there another way to "on error abort"? I do not wish for it to try to reconnect at all... the scheduler will try to rerun the batch at a later time anyway.

Attached, I have a screenshot of my batch file run manually. If I punch in an "A" at the right moment, it will abort and exit. If not, it will continue running into perpetuity... or until the network connection gets fixed.

Please attach a full log file showing the problem (using the latest version of WinSCP).

To generate log file, use /log=path_to_log_file command-line argument. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.
_________________
Martin Prikryl
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