append to add info in a file?
Blitz3D Forums/Blitz3D Beginners Area/append to add info in a file?
| ||
Hi, I need to create a log file, adding info without loosing old data. how can I write a file without loosing the old file data? I remember that in qbasic, the function "append" used to do that. regards!. |
| ||
Use OpenFile instead of WriteFile. Next, use SeekFile/FileSize to seek to the end of the file. Then, you can add data to it. |
| ||
yeap! thanks Warner! file = openfile(filename$) seekfile (file,filesize(filename$)) writeline file,"APPENDING TEXT LINE" closefile file works!!! Last edited 2011 Last edited 2011 |