Topic "how to get /Command put work with Filenames having spaces"

Author Message
CCR

Guest


hello,
i hope someone had that problem before or i am just to stupid.
i did escape everything i could, but i could't get this statement work properly. i must have it scripted since it is for automation

WinScp3.com /command "open me@myserver" "put "C:\Documents and Settings\SomePath\SomeFile.txt" "Projekte"" close exit

i though double escaping is necessary (i can't get it work without anyway).

help is highly appreciated
thanks in advance
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24512
Location: Prague, Czechia
I do not think it is possible due to limitations of Windows shell.
_________________
Martin Prikryl
ccr

Guest


thanks martin,
i already gave up on this - an turned in to /script - now it works
RickB

Guest


CCR wrote:
hello,
i hope someone had that problem before or i am just to stupid.
i did escape everything i could, but i could't get this statement work properly. i must have it scripted since it is for automation

WinScp3.com /command "open me@myserver" "put "C:\Documents and Settings\SomePath\SomeFile.txt" "Projekte"" close exit

i though double escaping is necessary (i can't get it work without anyway).

help is highly appreciated
thanks in advance


I know you have found a workaround but for the record here is a possible solution.
I had this problem and solved it by using the short (8dot3) version of the path. For example, you could do this instead:

WinScp3.com /command "open me@myserver" "put C:\DOCUME~1\SOMEPA~1\SOMEFI~1.txt Projekte"

The exact 8dot3 names of your directories and files may no be what I have typed above, but probably is. you can open a command prompt and type DIR /X and you will see the short 8dot3 names in the DIR listing.
Advertisements

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!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License