Thanks Andrew. In future I will look at using filestreams rather than go down the AssignFile route.
2008/12/19 Andrew Brunner <[email protected]>: > Ok, so if you want to use TFileStream you would just > > > FS.Seek(0,sofromEnd); > FS.Write(MyRec,SizeOf(MyRec)); > > > > > On Fri, Dec 19, 2008 at 7:49 AM, Andrew Brunner > <[email protected]> wrote: >> procedure Append(); >> var >> sBuffer:string; >> iLength:integer; >> begin >> >> sBuffer:='My Appended String'#13#10; >> iLength:=Length(sBuffer); >> >> FS:=TFileStream.Create(sFileName, fmshareDenyWrite); >> Try >> FS.Seek(0,soFromEnd); >> FS.WriteBuffer(sBuffer[1],iLength); >> Finally >> FreeAndNil(FS): >> end; >> end; >> >> On Fri, Dec 19, 2008 at 7:10 AM, Dave Coventry <[email protected]> wrote: >>> Can one do this? >>> >>> I know that you can append test to the end of Text files, but can you >>> tack on data to an existing file? >>> _______________________________________________ >>> Lazarus mailing list >>> [email protected] >>> http://www.lazarus.freepascal.org/mailman/listinfo/lazarus >>> >> > _______________________________________________ > Lazarus mailing list > [email protected] > http://www.lazarus.freepascal.org/mailman/listinfo/lazarus > _______________________________________________ Lazarus mailing list [email protected] http://www.lazarus.freepascal.org/mailman/listinfo/lazarus
