WinSCP uploaded file renamed to ^

Advertisement

question
Guest

WinSCP uploaded file renamed to ^

WinSCP uploaded file gets renamed to ^.
If i upload the same file manually it works, same thing with command line.
When i create a batch script with WinSCP and i iuse it, then the file gets renamed, but why?

@echo off

"C:\Program Files (x86)\WinSCP\WinSCP.com" ^
/log="C:\Temp\WinSCP log\WinSCP.log" /ini=nul ^
/command ^
"open ftpes://xxx/" ^
"put -latest "x:\*" ^
"exit"

set WINSCP_RESULT=%ERRORLEVEL%
if %WINSCP_RESULT% equ 0 (
echo Success
) else (
echo Error
)

exit /b %WINSCP_RESULT%

Reply with quote

Advertisement

question
Guest

Also when i look at the log, clearly i can see that correct file is selected, but why is it renamed?

File: 'X:\test.csv'
Copying 'X:\test.csv" to remote directory started.
...
STOR ^
150 Opening data channel for file upload to server of "/^"
226 Successfully transferred "/^"
Transfer done: 'X:\test.csv' => '/^' [5]

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
40,567
Location:
Prague, Czechia

Re: WinSCP uploaded file renamed to ^

You have quotes wrong.

Correct syntax is either:
"put -latest ""x:\*""" ^
Or simply (as there are no spaces in the path):
"put -latest x:\*" ^

Reply with quote

Advertisement

You can post new topics in this forum