command prompt won't exit
I have a batch file that runs and completes, but the command prompt will not exit, I have the
exit
command there, but I still end up with winscp>
with an open command prompt. Below is my script. I've xxxx out all the FTP site info. I've also included a picture. What am I missing?
@echo off "C:\Program Files (x86)\WinSCP\WinSCP.com" ^ /log="C:\Temp\WinSCPLog\!S.log" /ini=nul ^ /command ^ "open sftp://xxxxxx:xxxxxxxxx@mysftp.com/ -hostkey=""xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=""" ^ "lcd C:\Temp\POFILE" ^ "cd /IN" ^ "get *.txt" ^ "mv *.txt Archive/" ^ "exit" set WINSCP_RESULT=%ERRORLEVEL% if %WINSCP_RESULT% equ 0 ( echo Success ) else ( echo Error ) exit /b %WINSCP_RESULT%