OS; Windows 2008 Standard 32 bit
Running WinSCP.com via batch file using commandline:
winscp.com /ini="C:\Program Files\WinSCP\WinSCP.ini" /script="ICISPRD_OB10.ftp"
option batch abort
option confirm off
OB10_Production is a stored session within WinSCP.
The external server this connects to has occasional problems rejecting connections but a rerun of the process normally solves the problem. Today however the external refused to connect at all due to a problem at their end, WinSCP kept retrying as shown in the attached logfile until the server appears to have been turned off. This however DID NOT cause the connection to fail and the batch file continued to wait at the winscp command line for further actions to be taken until the job was forcibly killed an hour or so later.
How can I get WinSCP to detect this kind of error and report it back to the batch file so that processing can realise there is an error and gracefully finish ?