Link to home
Start Free TrialLog in
Avatar of baleman2
baleman2

asked on

Batch File to move Folders / Files to USB devices

We have an external Hard Drive (Drive E:) that is shared by 4 end users, i.e., all end users save documents to this device.   This device is never taken off the network.  Although Carbonite is being used for offsite storage of all content on this drive, we'd like to have a local backup solution also.
Our intention is to have 2 USB hard drives that would be plugged in to an end users computer in late afternoon just before our end users leave work.  Device USB1 and Device USB2 would be used on Monday for an initial copy of the Folders / Files from Drive E:.   Then, the devices would be used on alternative nights from that time on.
I need a batch file that would:
   1) On Monday, copy all files from Drive E: to USB1 and USB2
        a) Folder and File Structure would have to be duplicated exactly
 I need a different batch file that would:
   1) On Tuesday late afternoon, only APPEND to Device USB1 those files that had been changed since the files were last saved on Device USB1.
   2) On Wednesday morning, Device USB1 would be unplugged and stored in a safe place.
       a) Device USB2 would be plugged in and be ready for use late afternoon.
   3) On Wednesday late afternoon, only APPEND to Device USB2 those files that had been changed since the files were last saved on Device USB2
   4) On Thursday morning, Device USB2 would be unplugged and stored in a safe place
       a) Device USB1 would be plugged in and be ready for use late afternoon.
   5) Process would continue on all workdays.

In the event of disaster to Drive E: at any time during the day, at worst we'd have a copy of Drive E: on either USB1 or USB2 that would be missing only the current day's Folders / Files.
ASKER CERTIFIED SOLUTION
Avatar of hypercube
hypercube
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I would use robocopy. It's a standard Microsoft utility, should be on your system already and has extensive help.
Avatar of baleman2
baleman2

ASKER

This worked out best.
Good to hear.  You can also trigger SecondCopy profiles using batch files.  I do that when I want to log actions.