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

Advertisement

Flyingspaniard
Guest

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

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:-

"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:-

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

Reply with quote

Advertisement

Advertisement

You can post new topics in this forum