Topic "Problems passing double quoted "" dirs on cmdline to remote"

Author Message
[View user's profile]

Joined: 2006-10-18
Posts: 22
I want to download some remote files to a local directory whose path contains blanks.
Since blanks are interpreted as comand delimiters I get mess when executing the following command from a batch file getdata.bat:

set localdir=D:\mydata\2007 logs\
winscp /console /command "get ccc.log "%localdir%""

When I execute the same command on the remote console:

get ccc.log "D:\mydata\2007 logs\"

....everything works fine.
However I have problems passing the inside double quotes to the remote computer shell.
Even masking them with \ or ^ does not work.

How can I do this otherwise ?

[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24736
Location: Prague, Czechia
This is limitation of Windows shell (cmd.exe), that I do not know solution for. You can use script file instead.
Martin Prikryl

You can post new topics in this forum

Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!


About donations

$9   $19   $49   $99

About donations


WinSCP Privacy Policy

WinSCP License