Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have the following folders on a Windows machine

C:\FolderToCopy

C:\Dest

Both folders are empty.

I want to execute a copy operation from a command prompt so that I have this in the end:

C:\FolderToCopy

C:\Dest\FolderToCopy

In other words, I want to copy FolderToCopy so that it is now in the C:\Dest folder.

I know this should be easy - I do this often enough from the UI - but nothing I try seems to work.

share|improve this question

migrated from stackoverflow.com Mar 1 '10 at 15:41

This question came from our site for professional and enthusiast programmers.

add comment

3 Answers

up vote 2 down vote accepted

robocopy C:\FolderToCopy\ C:\Dest\FolderToCopy /E

share|improve this answer
    
That did the trick. Good ol' robocopy! –  Tola Odejayi Mar 1 '10 at 17:38
add comment
XCOPY /S /Y C:\FolderToCopy C:\Dest\

The last slash is important.

share|improve this answer
    
I tried this (even with the last slash) but it didn't work. –  Tola Odejayi Mar 1 '10 at 15:48
add comment

copy C:\FolderToCopy\*.* C:\Dest\FolderToCopy

share|improve this answer
    
No joy with this, either. –  Tola Odejayi Mar 1 '10 at 15:48
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.