Good Morning
I have this script below that compares FILE1 and FILE2 - any differences are written to the results.txt.
The only problem I have is if a new entry is added to FILE2 then the script doesn't write the new entry to the results. It only works if an entry is missing from FILE2 compared to FILE1.
Any Ideas?
Thanks
Set fso=CreateObject("Scripting.FileSystemObject")
Set txtfile=fspenTextFile("FILE1.txt")
data=txtfile.readAll
txtfile.close
txtArray=split(data,vbCRLF)
Set txtfile=fspenTextFile("FILE22.txt")
data=txtfile.readAll
txtfile.close
dim list
for n=0 to ubound(txtArray)
if instr(data,txtArray)=0 then list=list & txtArray & vbCRLF
next
Set txtfile=fso.CreateTextFile("RESULTS.txt")
txtfile.write list
txtfile.close
I have this script below that compares FILE1 and FILE2 - any differences are written to the results.txt.
The only problem I have is if a new entry is added to FILE2 then the script doesn't write the new entry to the results. It only works if an entry is missing from FILE2 compared to FILE1.
Any Ideas?
Thanks
Set fso=CreateObject("Scripting.FileSystemObject")
Set txtfile=fspenTextFile("FILE1.txt")
data=txtfile.readAll
txtfile.close
txtArray=split(data,vbCRLF)
Set txtfile=fspenTextFile("FILE22.txt")
data=txtfile.readAll
txtfile.close
dim list
for n=0 to ubound(txtArray)
if instr(data,txtArray)=0 then list=list & txtArray & vbCRLF
next
Set txtfile=fso.CreateTextFile("RESULTS.txt")
txtfile.write list
txtfile.close