I'm using /fwrite to write to and append to logfiles. I was under the assumption that /fwrite would append it to the end of the file, but it turns out it writes at the start of the file, overwriting the old data.
Now, it's pretty clear to me that I need to use the /fseek command to set the pointer to the end of the file before using /fwrite, but what is the best way of doing that? /fseek has several switches, but it's not exactly clear what each switch does, especially the -n switch.
/fseek <name> <position>
Sets the read/write pointer to the specified position in the file. The following switches may also be used to move the file pointer:
-l <name> <line number>
-w <name> <wildcard>
-r <name> <regex>
What's the recommended command to place the pointer at the end of the file? For what it matters, all lines are written with the -n switch, and thus end with $crlf.