BAT Script opens Session, No Commands
This used to run with no issue on versions of Windows Server prior to 2016. Now, it will execute, but leave open a command prompt with an active WinSCP session waiting for the commands. Eventually the session times out with no action.
Any ideas?
Any ideas?
"C:\Program Files (x86)\WinSCP\WinSCP.com" ^ /log="C:\logs\WinSCP\WinSCP.log" /ini=nul ^ /command ^ "open sftp://***:***@ftp.***.org/ -hostkey=""ssh-rsa 2048 ***""" ^ "lcd ""C:\LocalFolder""" ^ "cd /remoteFolder" ^ "get -delete myfile.csv" ^ "exit" set WINSCP_RESULT=%ERRORLEVEL% if %WINSCP_RESULT% equ 0 ( echo Success ) else ( echo Error ) exit /b %WINSCP_RESULT%