Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

share|improve this question
add comment

2 Answers

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
1  
I also suggest using rsync. –  The Digital Ninja Jun 11 '09 at 21:12
add comment

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
add comment

Your Answer

 
discard

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.