Open an existing file and add appended text

In this category you can exchange your programming questions and solutions.
Post Reply
Darren
Posts: 63
Joined: Wed May 11, 2011 11:55 am

Open an existing file and add appended text

Post: # 753Post Darren
Tue Aug 30, 2011 10:33 pm

I have an existing file that I want append using F.Write

However, all that I am getting is the new line overwriting the existing line. Does anybody know how to do this.

The file is to be opened, appended and then closed. Later to be opened again, appended and again closed etc etc

Thanks in advance!!!

Marco
Site Admin
Posts: 246
Joined: Sat Sep 15, 2018 8:41 pm

Open an existing file and add appended text

Post: # 754Post Marco
Wed Aug 31, 2011 3:08 pm

set the file position

supose file is the open filestream

file.position=file.size
file.write("blabla")

best regards

Post Reply