Hi,
I have two text files, one which contains raw data and another which is cleaned up.
I was wondering is it possible to compare the two text files and if the first string matches in both text files then to copy the second string from the raw text file into the clean text file at the end of the line?
Previously when comparing files all I've done is compared them as a whole rather than strings
Code:
'Read all of your files
Dim file1 As String = IO.File.ReadAllText("E:\File1.txt")
Dim file2 As String = IO.File.ReadAllText("E:\File2.txt")
'Compare if they're the same
If file1 = file2 Then
MessageBox.Show("same")
'They're the same
Else
MessageBox.Show("different")
'They're different
End If
Any help is appreciated, thanks