Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 have the following folders on a Windows machine



Both folders are empty.

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



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 Mar 1 '10 at 15:41

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

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
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
If you want to use XCOPY in this concrete case, you must add the /E switch to copy also empty folders. – Wayfarer Jul 13 '15 at 13:25

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

share|improve this answer
No joy with this, either. – Tola Odejayi Mar 1 '10 at 15:48

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.