Solved

RoboCopy

Posted on 2014-01-30
6
362 Views
Last Modified: 2014-02-06
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?
0
Comment
Question by:sglee
6 Comments
 
LVL 34

Expert Comment

by:Dan Craciun
ID: 39822491
Seems easier to just delete all the infected files and then copy over everything, not allowing overwrites.

HTH,
Dan
0
 
LVL 8

Accepted Solution

by:
fundacionrts earned 500 total points
ID: 39822585
Try this batch:
@ECHO OFF
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
0
 

Author Comment

by:sglee
ID: 39822672
@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.
0
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 
LVL 31

Expert Comment

by:Gareth Gudger
ID: 39822796
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.
0
 

Author Comment

by:sglee
ID: 39823073
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?
0
 
LVL 31

Expert Comment

by:Gareth Gudger
ID: 39823242
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.
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
While rebooting windows server 2003 server , it's showing "active directory rebuilding indices please wait" at startup. It took a little while for this process to complete and once we logged on not all the services were started so another reboot is …
This tutorial will walk an individual through locating and launching the BEUtility application to properly change the service account username and\or password in situation where it may be necessary or where the password has been inadvertently change…
This tutorial will show how to configure a single USB drive with a separate folder for each day of the week. This will allow each of the backups to be kept separate preventing the previous day’s backup from being overwritten. The USB drive must be s…

816 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now