troubleshooting Question

Powershell script to compare two txt files and use 'replace' on the identified differences

Avatar of sahs2016 rred
sahs2016 rred asked on
Powershell
8 Comments2 Solutions127 ViewsLast Modified:
Hi all,

I got two text files where txt1 got :

server 1 drive 1
server1 drive 4
server2 drive1

txt2 got:

server1 drive1
server2 drive1
server2 drive 3
server1 drive4
server2 drive5

where i want to match the txt files and the differences in txt2 file should be marked as "does not exists" like below

server1 drive1
server2 drive1
server2 drive 3 does not exists
server1 drive4
server2 drive5 does not exists

thanks in advance!
ASKER CERTIFIED SOLUTION
Qlemo
"Batchelor", Developer and EE Topic Advisor

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Top Expert 2015

The Distinguished Expert awards are presented to the top veteran and rookie experts to earn the most points in the top 50 topics.

Join our community to see this answer!
Unlock 2 Answers and 8 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 8 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros