0

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?

Dennis
  • 50,701

2 Answers2

1

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.

Dennis
  • 50,701
1

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.

Shadok
  • 4,070