returning non-zero code even though FTP was successful
we have an ".bat" file that FTPs files to an outside vendor. after running winscp to FTP the files the script checks %ERRORLEVEL% to make sure the FTP was successful. %ERRORLEVEL% is valued to '1' so the script abends, but when you check with the vendor, the files have successfully been sent. can anyone explain? Here is a portion of the logfile:
Binary transfer mode selected.
Checking existence of file.
Type: SSH_FXP_LSTAT, Size: 52, Number: 263
Type: SSH_FXP_STATUS, Size: 29, Number: 263
Status/error code: 2
Checking existence of partially transfered file.
Type: SSH_FXP_LSTAT, Size: 61, Number: 519
Type: SSH_FXP_STATUS, Size: 29, Number: 519
Status/error code: 2
Opening remote file.
Type: SSH_FXP_OPEN, Size: 77, Number: 771
Type: SSH_FXP_HANDLE, Size: 13, Number: 771
Type: SSH_FXP_WRITE, Size: 4121, Number: 1286
95 skipped SSH_FXP_WRITE, SSH_FXP_READ, SSH_FXP_DATA and SSH_FXP_STATUS packets.
Type: SSH_FXP_CLOSE, Size: 13, Number: 13828
Type: SSH_FXP_STATUS, Size: 24, Number: 13318
Type: SSH_FXP_STATUS, Size: 24, Number: 13574
Type: SSH_FXP_STATUS, Size: 24, Number: 13828
Status/error code: 0
Type: SSH_FXP_RENAME, Size: 108, Number: 14098
Type: SSH_FXP_STATUS, Size: 24, Number: 14098
Status/error code: 0
Type: SSH_FXP_SETSTAT, Size: 64, Number: 1033
Type: SSH_FXP_STATUS, Size: 24, Number: 1033
Status/error code: 0
Binary transfer mode selected.
Checking existence of file.
Type: SSH_FXP_LSTAT, Size: 52, Number: 263
Type: SSH_FXP_STATUS, Size: 29, Number: 263
Status/error code: 2
Checking existence of partially transfered file.
Type: SSH_FXP_LSTAT, Size: 61, Number: 519
Type: SSH_FXP_STATUS, Size: 29, Number: 519
Status/error code: 2
Opening remote file.
Type: SSH_FXP_OPEN, Size: 77, Number: 771
Type: SSH_FXP_HANDLE, Size: 13, Number: 771
Type: SSH_FXP_WRITE, Size: 4121, Number: 1286
95 skipped SSH_FXP_WRITE, SSH_FXP_READ, SSH_FXP_DATA and SSH_FXP_STATUS packets.
Type: SSH_FXP_CLOSE, Size: 13, Number: 13828
Type: SSH_FXP_STATUS, Size: 24, Number: 13318
Type: SSH_FXP_STATUS, Size: 24, Number: 13574
Type: SSH_FXP_STATUS, Size: 24, Number: 13828
Status/error code: 0
Type: SSH_FXP_RENAME, Size: 108, Number: 14098
Type: SSH_FXP_STATUS, Size: 24, Number: 14098
Status/error code: 0
Type: SSH_FXP_SETSTAT, Size: 64, Number: 1033
Type: SSH_FXP_STATUS, Size: 24, Number: 1033
Status/error code: 0