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
Ask a Question
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

troubleshooting Question

How do I merge the data between two files if the contents is different?

Avatar of E=mc2
E=mc2 asked on
Microsoft DOSWindows OSMicrosoft Legacy OS
26 Comments1 Solution365 ViewsLast Modified:
I would like to compare the "contents" of 2 files, ie:

Folder E is the 'goto' folder.

Scenarios:

E:\FOLDER\text1.txt
F:\FOLDER\text1.txt

If the contents of the data is exactly the same in both files, then there should be no merging.  

If there is the same data in both files, but there is extra data in one of the files, then the files should be merged, however there should be no duplication of the data which is found which is the same, that data should only show up once.
The file where the merge should be sent to is the E FOLDER.

or, this other scenario:

E:\FOLDER\
F:\FOLDER\text1.txt  
(in this scenario text1. should be copied to the E FOLDER path since there is no data in E FOLDER.