transferring files with spaces in them with putty's pscp

1

I tried the following to no avail:

pscp -load test username username@domain.tld:"file name.ext" "file name.ext"

pscp -load test username "username@domain.tld:file name.ext" "file name.ext"

pscp -load test username username@domain.tld:"file\ name.ext" "file name.ext"

pscp -load test username "username@domain.tld:file\ name.ext" "file\ name.ext"

pscp -load test username username@domain.tld:"c:\\path\to\\file\ name.ext" "/home/username/file\ name.ext"

pscp -load test username "username@domain.tld:c:\\path\to\\file\ name.ext" "/home/username/file\ name.ext"

Both returned me a More than one remote source not supported error.

Is it just not possible?

neubert

Posted 2014-06-27T01:12:37.030

Reputation: 3 991

With Cygwin scp I normally quote and escape the spaces, which seems to work. eg. 'file\ name.txt' Putty's pscp might be similar. – Mike Fitzpatrick – 2014-06-27T01:20:22.823

Didn't work for me :( I updated my orig post to include my attempts with the escaped space. – neubert – 2014-06-27T01:30:38.637

I think you have to specify the path also. eg. username@domain.tld:/path/to/file\ name.ext. – Mike Fitzpatrick – 2014-06-27T01:32:28.193

No luck. See my updated post. – neubert – 2014-06-27T01:35:55.030

1The username and host should be on the target eg. pscp -load test "c:\path\to\file name.ext" "username@domain.tld:/home/username/file\ name.ext" You're already logged into Windows, so you don't need to specify local credentials. And you don't need to escape the space for the Windows filename. – Mike Fitzpatrick – 2014-06-27T01:42:03.220

@neubert, are both machines Windows or is the remote machine *nix? – Mike Fitzpatrick – 2014-06-27T01:45:31.530

@neubert, also, can you successfully transfer a file without spaces in the filename? – Mike Fitzpatrick – 2014-06-27T01:47:15.503

@Mike Fitzpatrick - I can indeed transfer without spaces. It's spaces that cause the problem. The machine I'm downloading to is Windows. The one I'm downloading from is Ubuntu. And the command you proposed is for uploading, not for downloading. – neubert – 2014-06-28T04:01:18.500

No answers