Was die Zeilenenden betrifft, hiermit:
Delphi-Quellcode:
program CleanLineFeeds;
{$APPTYPE CONSOLE}
uses
System.SysUtils,
System.IOUtils;
procedure HandleFile(
const FileName:
string);
var
S:
string;
begin
S := TFile.ReadAllText(FileName);
S := AdjustLineBreaks(S);
TFile.WriteAllText(FileName, S);
end;
procedure Main;
var
I: Integer;
begin
for I := 1
to ParamCount
do begin
HandleFile(ParamStr(I));
end;
end;
begin
try
Main;
except
on E:
Exception do
Writeln(E.ClassName, '
: ', E.
Message);
end;
end.