I need to copy a deep directory on one windows machine over 'itself' on another windows machine. I can't seem to get the command to work correctly. The current problem is that it appears that scp is stripping the slashes out of the source parameter.

scp -v -r COMPUTER1:D:\A\B COMPUTER2:D:\A\B

I've also just tried to copy to a different name like

scp -v -r COMPUTER1:D:\A\B COMPUTER2:D:\A\B1

link|improve this question

feedback

2 Answers

I'm pretty sure the problem is that those are backslasches and need to be escaped properly (I don't do Windows but I'd try using 2 backslashes instead of one.

If you sill can't figure out the right syntax how to escape it use WinSCP

You might also want to look into rsync which provides not only the security ssh has (by tunneling thru it) but also adds the benefit of incremental copies. You only copy what you need.

Among other features it has a very powerfull inclusion/exclusion syntax as well as a really usefull server mode

link|improve this answer
1  
I also suggest using rsync. – The Digital Ninja Jun 11 '09 at 21:12
feedback

On windows you can either use forward slashes instead of back slashes (scp -v -r COMPUTER1:D:/A/B COMPUTER2:D:/A/B) just like you do for file:// URLs, or quote the paths (not sure if it is single or double, and this doesn't always work).

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.