I'm just wondering if it's possible to compare two text file and check if there's a difference between them? What I mean is like this,
For example I have text1.txt :
123
456
789
000
and I have text2.txt :
123,test,input,bake
789,input,cake,bun
Expected output :
456 does not exist in text2.txt
000 does not exist in test2.txt
I'm new to this language (Powershell) I just have this code that getting the content of two text file and I don't know how to compare it.
$file1 = "C:\test\folder\test1.txt";
$file2 = "C:\test\folder\test2.txt";
$getfile1 = Get-Content $file1
$getfile2 = Get-Content $file2
Something to get you started:
Good luck learning powershell!