exit command at the end of winscp.com command closes all windows and the batch script cannot continu
I have this command in a batch script:
"C:\Program Files (x86)\WinSCP\WinSCP.com" ^
/log="X:\cme\ftp_files\DailyLog\WinSCP.log" /ini=nul ^
/command ^
"open sftp://acoscftp:""@NLJl!xS<mqq""@sftpng.cmegroup.com/ -hostkey=""ssh-rsa 2048 jnrVgUsNrZ+VmunhM0XrnWnlc2gVhSBOK+jFx5vQoMc=""" ^
"cd Outgoing" ^
"get -filemask=""CME*.zip>=5D"" -transfer=binary /cme/ftp/OSC/Outgoing x:\CME\ftp_files\Download" ^
"exit"
But the "exit" terminates completely the script. As a workaround I created two scripts one with the winscp commnad and then another one that exec utes after the winscp finishes.
Is there another way of terminating the winscp.com commands sucha as "exit /b" ?
"C:\Program Files (x86)\WinSCP\WinSCP.com" ^
/log="X:\cme\ftp_files\DailyLog\WinSCP.log" /ini=nul ^
/command ^
"open sftp://acoscftp:""@NLJl!xS<mqq""@sftpng.cmegroup.com/ -hostkey=""ssh-rsa 2048 jnrVgUsNrZ+VmunhM0XrnWnlc2gVhSBOK+jFx5vQoMc=""" ^
"cd Outgoing" ^
"get -filemask=""CME*.zip>=5D"" -transfer=binary /cme/ftp/OSC/Outgoing x:\CME\ftp_files\Download" ^
"exit"
But the "exit" terminates completely the script. As a workaround I created two scripts one with the winscp commnad and then another one that exec utes after the winscp finishes.
Is there another way of terminating the winscp.com commands sucha as "exit /b" ?