Exit Code = 1
WinSCP.exe version 4.1.6, running on Windows Server 2003 R2 Standard Edition.
We use WinSCP.exe in a scheduled job to automatically transfer requests to one of our vendors. The scheduled job runs this batch file.
@echo off
WinSCP.exe /script=%1 %2
echo %ERRORLEVEL%
Where %1 is the name of the script file and %2 is the login credentials. A typical script file might look like this.
option batch on
option confirm off
option batch abort
cd inbound
put "Q:\WORK\UNDWDEPT\MVR\Daily\2009\10 - October\Requests\TC00002B4332"
close
exit
The ERRORLEVEL (exit code of WinSCP.exe) is read from the batch file. If it's 0 then we mark the file as sent, otherwise we try sending the file again later. This has been working fine for months, until last Friday. Then we suddenly started receiving exit codes of 1. Upon further investigation we found that the files were in fact making it to the remote server correctly, even though we were getting a non-zero exit code.
Any idea why the sudden change from 0 to 1 in the exit code? Could it be due to a change on the receiving system?
Does the 1 mean anything specific?
How can I reliably tell if the transfer was successful or not?
Thanks.
We use WinSCP.exe in a scheduled job to automatically transfer requests to one of our vendors. The scheduled job runs this batch file.
@echo off
WinSCP.exe /script=%1 %2
echo %ERRORLEVEL%
Where %1 is the name of the script file and %2 is the login credentials. A typical script file might look like this.
option batch on
option confirm off
option batch abort
cd inbound
put "Q:\WORK\UNDWDEPT\MVR\Daily\2009\10 - October\Requests\TC00002B4332"
close
exit
The ERRORLEVEL (exit code of WinSCP.exe) is read from the batch file. If it's 0 then we mark the file as sent, otherwise we try sending the file again later. This has been working fine for months, until last Friday. Then we suddenly started receiving exit codes of 1. Upon further investigation we found that the files were in fact making it to the remote server correctly, even though we were getting a non-zero exit code.
Any idea why the sudden change from 0 to 1 in the exit code? Could it be due to a change on the receiving system?
Does the 1 mean anything specific?
How can I reliably tell if the transfer was successful or not?
Thanks.