Hi guys,
I have a apps that I need your input inorder to improve efficiency, the apps can read a text file (A) and also another text file (B) then spit lines in both files, it can further compare to see if there is any common line using a unique column and then write it into a new text file (C).
Now I need assistance in this area, I want the apps to be able to leave the lines not in file (A) but in file (B) into a new text file (D) and also lines in file (B) not in file (A) into a new text file (E).
Please I need your urgent response, below is code
If OFDialog_check.FileName <> "" And OFDialog_Base.FileName <> "" Then
Dim sr1 = New StreamReader(OFDialog_check.FileName)
Dim sr2 = New StreamReader(OFDialog_Base.FileName)
line = ""
line2 = ""
'Dim new_records As String
Dim i As Integer = 0
Dim u As Integer = 0
For Each lin In IO.File.ReadLines(OFDialog_Base.FileName)
For Each lin2 In IO.File.ReadLines(OFDialog_check.FileName)
Dim value = lin.Split(","c)(0)
Dim value2 = lin2.Split(","c)(0)
If value2 = value Then
u += 1
line += u.ToString + "_" + lin + vbNewLine
IO.File.WriteAllText("C:\Users\HON\Desktop\Result\new result.txt", line)
End If
Next
Next
sr1.Close()
sr2.Close()
End If