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

Advertisement

DanielGow
Joined:
Posts:
2

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

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

Reply with quote

Advertisement

DanielGow
Joined:
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

Reply with quote

AaronO
Guest

Despite "option batch abort", it always reconnects

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

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

Description: Screenshot of reconnection

Capture_Final.PNG

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,517
Location:
Prague, Czechia

Re: Despite "option batch abort", it always reconnects

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

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.

Reply with quote

EricB
Guest

[RESOVED] with workaround

I had to integrate a filetransfer in a VB6-Component and catched the OutputDataReceived-Event.

When Substring "(A)bort" was part of the message-content, I send a Abort-call


Private Sub oSession_OutputDataReceived(ByVal sender As Variant, ByVal e As WinSCPnet.OutputDataReceivedEventArgs)
    Dim lMsg$
    lMsg = e
    If InStr(lMsg, oOption.Password) Then lMsg = Subst(lMsg, oOption.Password, String(10, "*"))
    If InStr(lMsg, "(A)bort") Then
        oSession.abort
    End If
    Debug.Print Timer, "Session_OutputDataReceived", lMsg
End Sub

Reply with quote

Advertisement

You can post new topics in this forum