I used the winscp generator and the file is uploaded, all seems to work, but I don´t get the error or success words when finished, and the ms-dos console keeps open, with word winscp>. I think something with spaces or " is wrong...What could be wrong here?
...............................................
@echo off
"C:\route to winscp\WinSCP.com" ^
/log="C:\route to log\log.log" /ini=nul ^
/command ^
"open sftp://user:pass@server:port/ -hostkey=""ssh-rsa ....."" -privatekey=""C:\route to key.ppk"" -passphrase="passphrase" -rawsettings Cipher=""aes,blowfish,3des,chacha20,WARN,arcfour,des"" KEX=""ecdh,dh-gex-sha1,dh-group14-sha1,dh-group1-sha1,rsa,WARN""" ^
"put C:\file to upload /dir to store/" ^
"exit"
set WINSCP_RESULT=%ERRORLEVEL%
if %WINSCP_RESULT% equ 0 (
echo Success
) else (
echo Error
)
exit /b %WINSCP_RESULT%