Avatar of OGSan
Flag 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!
VB ScriptNetwork Analysis

Avatar of undefined
Last Comment

8/22/2022 - Mon

robocopy is definitely the way to go.


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.

Thanks for the quick reply, motnahp00.  I'll give this a shot and report back soonest.

You're welcome.
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Log in to continue reading
Log In
Sign up - Free for 7 days
Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.

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

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.