Link to home
Start Free TrialLog in
Avatar of OGSan
OGSanFlag for United States of America

asked on

Need script or software to move files/directories but only if more recent or brand new

Hi, Experts -
Our IT team has recently set up new servers to hold all of our HR departmental data.  They made copies of everything that was on the old HR network share as of May 18.  However, the old locations were still accessible - and were being updated...!

I need a script that will copy the files (and, when found, copy entire new directories with their files) from the old location to the new location only when:
Timestamp of the file in the "old" location is more recent that the value found on the "new" location;
File in the "old" location is not found in the "new" location.

I was reading about Robocopy and then about RichCopy, but I figured I'd be better off asking one of the Experts:  What file synchronization/file copy software is most reliable and (fairly) easy to use?  I don't have a budget for this - so Free or Inexpensive would be best.  Many, many thanks for your input!
Avatar of motnahp00
motnahp00
Flag of United States of America image

robocopy is definitely the way to go.

Example:

robocopy \\locationA\share \\locationB\share /MIR /R:0

This will create a replica from location A and capture any new changes since the last time this command was executed.
Avatar of OGSan

ASKER

Thanks for the quick reply, motnahp00.  I'll give this a shot and report back soonest.
You're welcome.
SOLUTION
Avatar of motnahp00
motnahp00
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
ASKER CERTIFIED SOLUTION
Avatar of Ken Butters
Ken Butters
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
Avatar of OGSan

ASKER

Thanks, buttersk!  I'm liking allway sync a lot right now!
Avatar of OGSan

ASKER

Buttersk, thanks for suggesting allways sync - I'm going to use that!

Motnahp00, thanks for the quick response but I feel more comfortable not having to create a script from scratch and just using allways sync is the better fit for us right now.