Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

martin

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:\*" ^
question

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]
question

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%