Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.


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

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

share|improve this question

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

If you still can't figure out the right syntax 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 powerful inclusion/exclusion syntax as well as a really useful server mode.

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

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).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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