folder listHi,
 I have a file server (Windows 2003) with large amount of folders and files. Recently a lot of files got infected with virus; therefore became unusable. So I need to restore them from the external USB backup drive. There are a couple of thousands folders (alphabetically from A to Z) and virus infected every single file in the very first folder ('Arriz...') to middle of alphabet 'C'.
 As seen in the screenshot, C drive is in File Server and E drive is external USB drive. I like to be able to copy every single folder beginning with letter 'A' (excluding every other folder beginning with letter 'B' thru 'Z') to the server. Also I like to be able to use the wild card like "Ch**" because I like to copy only the folders beginning with "Ch" and nothing else.

Is it possible to do that?  Here is my pseudo xcopy command:

xcopy E:\Data\ASH*.* C:\Data /c /s /y

Can you help?
Who is Participating?
fundacionrtsConnect With a Mentor Administrador de SistemasCommented:
Try this batch:
CD e:\data
FOR /D  %%i in (A*) DO (
	robocopy "e:\data\%%i" "c:\data\%%i" /E /COPYALL
FOR /D  %%i in (Ch*) DO (
	robocopy "e:\data\%%i" "c:\data\%%i" /E /COPYALL

Open in new window

Hope this helps
Dan CraciunIT ConsultantCommented:
Seems easier to just delete all the infected files and then copy over everything, not allowing overwrites.

sgleeAuthor Commented:
@Dan Craciun
The last good backup was as of the last day of 2013 and the virus infection took place two weeks after that. During that time, users have created new documents in various folders and it would be impossible to delete only old files.
So my goal is to keep newly created files intact while copying.
The new generation of project management tools

With’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

Gareth GudgerCommented:
Take a look at RichCopy as well. It is Robocopy's GUI successor. It has all the same features as Robocopy in a GUI form. Lots of good copy options.
sgleeAuthor Commented:
RichCopy UI@diggisaur
Thanks for the information. It is a nice tool. Do you know if you can use "wild" card (when referring to directory names) with this tool?
Gareth GudgerCommented:
Not sure. Normally I am just copying a whole directory tree. I would stick it in Advanced mode from the menu though. You get a lot more options.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.