FileWrite at certain line..?


Active Member
Licensed User

i'm trying to write a line to a certain position within a file.My plan was to use FileRead to get to the position i'm looking for and then FileWrite to change the content of this line.

This doesn't work, because i cannot open a file for read & write access at the same time.I saw there is also FileGet and that stuff with cRandom access but i would like to stay with line based string access and not counting bytes in the file.

How can i achieve this..?




Licensed User
The easiest way i can think off, is to read and load the whole file to a table, apend the data you want, were you want it, and them save the file again overwriting the existing one...


Licensed User
I would like to use FileWrite and add a string (or strings) to the first line in the file. Is there a simple way or do I have to use the way you have described before as the only one solution? (L)