also zur zeit schaut das ganze wie folgt aus:
Code:
const
BlockSize = 1024;
var SrcStream, DestStream: TFileStream;
FileName, FileName2, Buffer: String;
N, ChunkLen :integer;
begin
FileName:= 'dump1.txt';
FileName2:= 'dump2.txt';
SrcStream:=TFileStream.Create(FileName,fmOpenread or fmShareDenyNone);
DestStream:=TFileStream.Create(FileName2,fmCreate);
try
N:=SrcStream.Size;
while N>0 do
begin
if N>BlockSize
then ChunkLen:=BlockSize
else ChunkLen:=N;
SetLength(Buffer,ChunkLen);
srcStream.ReadBuffer(Buffer,ChunkLen);
N:=N-ChunkLen;
FastReplace(Buffer,'\n', '', False);
DestStream.WriteBuffer(Buffer,Length(Buffer));
end;
finally
SrcStream.Free;
DestStream.Free;
end;
endet allerdings in einer Zugriffsverletzung unbekannter Herkunft =(