Archive: FileSeek problem


FileSeek problem
Hello,
According to the manual if you use FileSeek as so
FileSeek $9 0 END

The file pointer will be pointing to the end of the file. Now I have the following code


FileOpen $9 "start_all.cmd" a
FileSeek $9 0 END
FileWrite $9 "call e-xmi $SlotNameState start$\r$\n"
FileClose $9


I assumed that this will add a line to the file, which is not true. The code is appending to the file, but it is also erasing the provious
"call e-xmi $SlotNameState start
line. so after running it say 4 time I will have the header of the file, six lines of text, and the last call.

any ideas why this is happeneing?

cheers,
Ehsan

Working fine for me. What version of NSIS? What character encoding is the file using?

Stu


Sorry, bad friday. I had forgotten that I'm creating the folder for the file, just had to check if the folder exists
DirState $dir -1 ...

thanks.