Solved

RoboCopy

Posted on 2014-01-30
6
358 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 Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

This article is an update and follow-up of my previous article:   Storage 101: common concepts in the IT enterprise storage This time, I expand on more frequently used storage concepts.
Create your own, high-performance VM backup appliance by installing NAKIVO Backup & Replication directly onto a Synology NAS!
This tutorial will walk an individual through the process of configuring basic necessities in order to use the 2010 version of Data Protection Manager. These include storage, agents, and protection jobs. Launch Data Protection Manager from the deskt…
This tutorial will walk an individual through the process of installing the necessary services and then configuring a Windows Server 2012 system as an iSCSI target. To install the necessary roles, go to Server Manager, and select Add Roles and Featu…

747 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