Hi Guys
Is there any way to write to a Existing file.
Currently i am Reading a String then adding my string Erasing the file then Creating a new file and writing a string.
You approach is ok for relatively small files, there are limits associated with file size and stings and memory availablity - i.e. 64Kb is probably the max you can use
this method for.
You might be better off using the FOPEN, FWRITE and FCLOSE
functions to open the file for APPEND (if it exists), writing one or more new lines and then closing the file.
Code:
*
handle = FOPEN("Temp.txt",2)
*
* Go to the end of the file.
length = FSEEK(handle, 0, 2)
** write to the file (adding a crlf)
FWRITE(handle,"new Line"+chr(13)+chr(10))
** close it
FCLOSE(handle)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.