spontan hätte ich es so gemacht:
Delphi-Quellcode:
function CompareFiles(F1, F2: String): Integer;
var T: TStringList;
S1, S2: String;
i: Integer;
begin
T:=TStringList.Create;
T.Clear;
T.LoadFromFile(F1);
S1:=T.Text;
T.Clear;
T.LoadFromFile(F2);
S2:=T.Text;
T.Free;
Result:=Abs(Length(S1)-Length(S2));
for i:=1 to Min(Length(S1),Length(S2)) do
if S1[i]<>S2[i] then Inc(Result);
end;