Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

RoboCopy

Posted on 2014-01-30
6
Medium Priority
?
386 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 35

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 2000 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
 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

 
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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

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.
This article shows how to use a free utility called 'Parkdale' to easily test the performance and benchmark any Hard Drive(s) installed in your computer. We also look at RAM Disks and their speed comparisons.
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…
This tutorial will walk an individual through setting the global and backup job media overwrite and protection periods in Backup Exec 2012. Log onto the Backup Exec Central Administration Server. Examine the services. If all or most of them are stop…

704 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