We help IT Professionals succeed at work.
Get Started

Merge two folders with a lot of sub folders and files

Last Modified: 2015-06-17
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?
Watch Question
Most Valuable Expert 2019
Most Valuable Expert 2018
This problem has been solved!
Unlock 2 Answers and 5 Comments.
See Answers
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE