Topic "How do you deal with file paths with spaces in them?"

Author Message
Flyingspaniard

Guest


Hi,

I've looked everywhere on these forums and in the documentation for the answer to this, but without any luck...

I've successfully connected to and uploaded various files using the console and command parameters. However, I've just noticed in testing that if the filepath I supply has a space in it, then I get an error.

My command line looks like this:-

Code:
"C:\Program Files\WinSCP\WinSCP.com" /command "open UserName:P@55w0rd@ftpserver:22" "put C:\My Data Files\FileName_20080716.csv /RemoteFolder/SubFolder/" "exit"


The message returned is:-

Quote:
Connecting to host...
Authenticating...
Using username "UserName".
Authenticating with pre-entered password.
Authenticated.
Starting the session...
Reading remote directory...
Session started.
Active session: [1] UserName@ftpserver
'C:\My | 0 kB | 0.0 kB/s | binary | 0%
File or folder ''C:\My' does not exist.
(A)bort, (R)etry, (S)kip, Ski(p) all:


I'm sure there must be a way to pass in file paths with spaces in them, I just can't for the life of me figure out the syntax for it.

Any help would be appreciated.

Thanks
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24553
Location: Prague, Czechia
Please read documentation. If that does not help, come back.
_________________
Martin Prikryl
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