Spaces and SCP
Ok, so whilst trying to copy a directory structure from one of my Windows boxes at home, I had an issue getting scp to like the pathnames & filenames (they contained spaces). I’ve looked up the answer to this before as its affected me previously, but this time it took 10-15 minutes of googling. So I’m going to post it here for future reference.
scp 'user@host:/Path/Some Filename With Spaces' [destination]
Previous: Comparisons: iBook vs PowerBook Next: More file & directory copying

I found your blog while Googling for the answer myself, but your solution doesn’t work for me. What I needed to use was:
scp user@host:”‘/Path/Some Filename With Spaces’” [destination]
Note ” then ‘ (after the host) then ‘ and ” after the path.
October 31st, 2007 at 10:06 am
Interestingly, neither of those worked for me, I had to do a third variation:
scp user@host:’”d:/path/some filename with spaces”‘ dest
where the outer single quotes protect the command line for scp to pass through the double quotes to the windows machine on the other end (which is how windows does spaces).
scott
December 7th, 2007 at 3:27 am