"C:\Program Files (x86)\WinSCP\winscp" /script="C:\BackuptoNAS\tokenCheck01.cmd"
option batch on
option confirm off
open sftp://user:password@server:22 -passive
option transfer binary
option synchdelete off
call mount nasa:/vol/backup/admws01 /backup_admws1
When the script attempts to mount the remote file system, it receives a RETURN CODE of 33 if the remote file system is already mounted, but it is able to continue on and complete the next command in the sequence - ls.
I want to be able to capture the RETURN CODE (not the %errorlevel%) so that I can continue with normal path processing instead of going down the failover path. The %errorlevel% is set to '1' whether it has this RETURN CODE or the script cannot successfully log into the server.
Attached is a snippit of the log showing the above.
Thanks for any assistance