Re: "Error code: 2" in simple PUT
Martin, thanks a lot, it might be the cause: previously I used FTP only.
So far,
Cheers,
Piotr
So far,
mkdir
works! Thank you!
Cheers,
Piotr
mkdir
works! Thank you!
put
does not create the target directory. It actually might create them with some protocols. But it never creates them with SFTP.
mkdir
command:
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.
Cannot create remote file '/sincc.TXT'. ("No such file or directory.
Error code: 2
Error message from server: No such file."