tag auch
Quelltext
1: 2: 3: 4: 5: 6: 7: 8: 9: 10:
| var fsFrom, fsTo: TFilestream; begin fsFrom:= TFileStream.Create('c:\Datei1.txt', fmOpenRead); fsTo:= TFileStream.Create('C:\Datei2.txt', fmOpenWrite); fsFrom.Position:= 299; //position auf byte 300 setzen (da byte 1 = position 0); // fsTo.Position:= 799 // position in fsTo auf byte 800 setzen fsTo.CopyFrom(fsFrom, 300); //300 byte nach fsTo kopieren fsFrom.Free; fsTo.Free; end; |
fsTo.Position:= 799 habe ich ausgeklammert da ich nich genau weiß ob du es so meintest.
da fehlen sicher noch diese ganzen fehlerbehandlungsroutinen
ich hab den code auch net getestet und soll auch nur nen ansatz darstellen