Avatar of Scott Fell
Scott Fell
Flag for United States of America asked on

Merge two folders with a lot of sub folders and files

I have a situation where there are two folders that need to be merged to one.  The folders are about 8gig in size and contain many levels of sub folders with documents and some images.  The documents are going to be mostly xls, xlsx, doc, docx, ppt, txt, pdf, jpg.

Many of the files are duplicates although one folder may have a more recent document.

Folder A
-- SubFolder A.1
---- SubFolder A.1.1
------ Document A.1.1  somefile.docx last mod 6/12/2015 3:45pm
-- SubFolder A.2
---- SubFolder A.2.1
------ Document A.2.1  somefile.docx last mod 2/21/2015 10:21am


Folder B
-- SubFolder B.1
---- SubFolder B.1.1
------ Document A.1.1  somefile.docx last mod 1/1/2015 1:20pm-- SubFolder A.2
-- SubFolder B.2
---- SubFolder B.2.1
------ Document B.2.1  somefile.docx last mod 6/5/2015 12:53pm

This is on Windows Server 2008


My goal is to Merge everything in Folder B to Folder A where only folders and files get added to A from B that are not in A and only files from B get copied to A if they are newer than in A

Am I better off writing a vbscript or using something like RichCopy?
Windows BatchVB ScriptWindows Server 2008

Avatar of undefined
Last Comment
Steve Knight

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
oBdA

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
SOLUTION
Steve Knight

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Scott Fell

ASKER
Thank you.  I am going to give this a try now.
Scott Fell

ASKER
I used the robocopy, worked perfectly.  I can see the xcopy would be a solution as well.  Thank you both for answering!
Steve Knight

Would use robocopy myself too generally for the logging so agreed!
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