Post a reply

Before posting, please read how to report bug or request support effectively.

Bug reports without an attached log file are usually useless.

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: How do you deal with file paths with spaces in them?

Please read documentation. If that does not help, come back.
Flyingspaniard

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