Append data to a file
Posted: Thu May 15, 2014 10:40 pm
Is there any easy way to open a file and append data to the end of it instead of overwriting it ?
Essentially I would like to open an already existing text file, move to the end position and start writing data on a new line at the end of the file using WriteLine() ?
Edit forgot so say I'm doing this to try to get to the end of the file
OpenFile (1,"DB.CSV",#MODE_WRITE)
Seek(1,#EOF)
DebugPrint(FilePos(1))
Always Returns 0 as the filepos
Edit never mind I just discovered i am using the wrong #mode, should be #MODE_READWRITE
Essentially I would like to open an already existing text file, move to the end position and start writing data on a new line at the end of the file using WriteLine() ?
Edit forgot so say I'm doing this to try to get to the end of the file
OpenFile (1,"DB.CSV",#MODE_WRITE)
Seek(1,#EOF)
DebugPrint(FilePos(1))
Always Returns 0 as the filepos
Edit never mind I just discovered i am using the wrong #mode, should be #MODE_READWRITE