hallo.
i like to compare 2 txt files, but it doesn't work. can anyone help me ?
here's my script.
-------------------------------
$file1 = FileOpen("test.txt", 0)
$file2 = FileOpen("test2.txt", 0)
; Check if file opened for reading OK
If $file1 = -1 Then
MsgBox(0, "Error", "File1 kann nicht geöffnet werden.")
Exit
EndIf
If $file2 = -1 Then
MsgBox(0, "Error", "File2 kann nicht geöffnet werden.")
Exit
EndIf
; Read in 1 character at a time until the EOF is reached
While 1
$chars1 = FileRead($file1, 1000000)
If @error = -1 Then ExitLoop
MsgBox(0, "Inhalt 1:", $chars1)
$chars2 = FileRead($file2, 1000000)
If @error = -1 Then ExitLoop
MsgBox(0, "Inhalt 2:", $chars2)
Wend
If ($chars1 = $chars2) Then
MSgBox (0, "Vergleich", "Der Text hat sich nicht geändert.")
Else
MSgBox (0, "Vergleich", "Der Text hat sich geändert.")
EndIf
FileClose($file1)
FileClose($file2)
-------------------------------
Thanx for your support
viper67