Opening an existing file with FM_WRITE access
When I open an EXISTING file with FM_WRITE access, the file gets overwritten/recreated. I thought that FileOpen only created/recreated the file if it did not exist. I want to open a file, read a counter, increment a counter, and write the new value back out again. I close the file after each such iteration.
Re: Opening an existing file with FM_WRITE access
i think there's an FM_APPEND flag that could be specified.
so, your statement would be something like:
<font class="small">Code:</font><hr /><pre>
FileOpen ("myfile.txt", FM_APPEND)
in your particular scenario, you might want to do the following in your function:
1) see if file exists
2) if it doesn't use FM_WRITE
3) if it does use FM_APPEND