"Error code: 2" in simple PUT
But it doesn't work. WinSCP says
Error code: 2
sincc.TXT exists next to the WinSCP executable.
Why?
I will attach the log.
Thanks in advance. Sorry for my English.
Advertisement
Error code: 2
sincc.TXT exists next to the WinSCP executable.
Advertisement
Cannot create remote file '/sincc.TXT'. ("No such file or directory.
Error code: 2
Error message from server: No such file."
Advertisement
Advertisement
put was creating a folder if it didn't exist, worked like a charm for years.
"open sftp://login:password@domain.com/ -hostkey=""xxx"" -rawsettings PingType=2 FSProtocol=2 ProxyPort=1 SFTPMaxVersion=3" ^ "put -nopreservetime ""N:\path_to_file\.htaccess"" /test2/" ^ "put -nopreservetime ""N:\path_to_file\index.php"" /test2/" ^ "put -nopreservetime ""N:\path_to_file\file?1?-*.pdf"" /test2/" ^ "put -nopreservetime ""N:\path_to_file\file?1?-*.mp3"" /test2/" ^ "exit" set WINSCP_RESULT=%ERRORLEVEL% if %WINSCP_RESULT% equ 0 ( echo Success ) else ( echo Error )
/test2 folder, and put all files in it.
put does not create the target directory. It actually might create them with some protocols. But it never creates them with SFTP.
mkdir command:
mkdir works! Thank you!
Advertisement
You can post new topics in this forum