The same problem. WinSCP.exe does not stop reconnecting. Tried all command line switches, nothing helps.
WinSCP always chooses to "Reconnect" instead of "Abort". My log is attached.
First, I do not understand the problem. What is wrong about WinSCP reconnecting once in this particular case?
Anyway, you cannot prevent WinSCP from trying to reconnect at all from script only. You would have to configure this in GUI:
In script you can only limit time WinSCP tries to reconnect to shortest possible time (one second) using
option reconnecttime 1
The OP used wrong syntax without
. And he probably believed that value
means no reconnect. But it means no limit on reconnect time.