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

My scanner software puts it's file into YYYY_MM_DD subfolders in C:\Dokumente und Einstellungen\Enrico\Eigene Dateien\Eigene Bilder\MP Navigator EX. The files are all JPEG files.

Now I need to copy them out of the virtual machine, into a shared drive which is called E:.

I would like to copy the subfolders into the shared drive, so that I have those date folders there. If a new picture is added to today's folder, it should be copied as well.

On Linux, I would just use rsync -avE for this.

How can I do this with a plain batch file in XP and 7?

share|improve this question
The third paragraph confuses me. Do want to copy or move the pictures? – Dennis Dec 13 '11 at 14:54
Just copy, move is a little too risky. – Martin Ueding Dec 13 '11 at 14:59
up vote 1 down vote accepted

You can use xcopy to copy entire directories (including subdirectories).

The syntax is:

xcopy source destination /S

where the /S switch includes non-empty directories (/E copies empty directories as well).

There are a couple of switches that serve as a backup solution:

  • /M copies only changed files (archive attribute set) and unsets the attribute.

  • /D copies only those files whose source time is newer than the destination time.

share|improve this answer

Use Robocopy which is the microsoft equivalent to rsync.
To get the same result as rsync -avE /source /dest use the following command:

robocopy source dest /e

To run rsync -avE --delete you can directly use robocopy /mir.

share|improve this answer
This is also neat. I assume that this preferred over old xcopy? – Martin Ueding Dec 13 '11 at 15:16
As much as rsync is sometimes preferred to cp under *NIX systems :) It can resume transfers but doesn't support Volum Shadow Copy altough it can be used against an existing shadow copy. tl;dr is "xcopy < robocopy < rsync" feature-wise – Shadok Dec 13 '11 at 16:29
It looks nice indeed. The tl;dr is not really needed for a two sentence comment … are are we in the flutter age now? ;-) – Martin Ueding Dec 13 '11 at 18:11
Sorry I can't revert that. I was maybe put off but my dislike for comments due to their lack of formatting possibilities and the fact you can't edit them afterwards, I'd prefer to have the same tools as in an answer but in a smaller font. – Shadok Dec 14 '11 at 14:00

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.