Note the lines don't have to be in the same order but need to be in the file.
This is a handy bit of code for checking text files are not different.
It also remembers the files you last compared, and also displays the line it cannot find in a copyable input box.
It gives up if it finds more than 5 lines missing.
Stick this code in a button:
Dim uiw As New notesuiworkspace
Dim uidoc As notesuidocument
Set uidoc = uiw.currentdocument
Dim doc As notesdocument
Set doc = uidoc.document
Dim s As New notessession
f1 = s.getenvironmentstring("ef1")
f2 = s.getenvironmentstring("ef2")
f1= Inputbox$("File1?", "File", f1)
f2=Inputbox$("File2?","File", f2)
Call s.setenvironmentvar("ef1", f1)
Call s.setenvironmentvar("ef2", f2)
fileNum% = Freefile
counter% = 0
Open f1 For Input Access Read As fileNum%
Print "files" fileNum% & " " & fileNum2%
count1=1
errcount=0
Do Until count1 > 10000 Or Eof(filenum%) or errcount>5
Line Input #filenum%, first
fileNum2% = Freefile
Open f2 For Input Access Read As fileNum2%
found=False
count2=1
Do Until found=True Or Eof (fileNum2%)
Line Input #fileNum2%, sec
If Cstr(first) = Cstr(sec) Then
If count1=count2 Then
Print ("Line " & count1 & " found at " & count2 )
Else
Print ("Line " & count1 & " found at " & count2 & " different number!")
End If
found=True
End If
count2=count2+1
Loop
If Eof(FileNum2%) Then
r= Inputbox$ ("Cannot find line " & count1, "", first )
errcount=errcount+1
End If
Close #fileNum2%
count1=count1+1
Loop
If errcount>5 Then
msgbox "Found too many errors!"
End
End If
If Eof(FileNum%) Then
Msgbox "Finished! Wahooo! " & count1
Close #fileNum%
End
End If