Saving a file appends a blank line
Posted: Thu Apr 07, 2022 11:55 am
When I load a file into a string and then later write the same string back to the file for saving, it will append a new blank line at the end of the file every time the file is loaded and then saved.
How can I prevent that?
How can I prevent that?
Code: Select all
If Exists("notat.dat")
OpenFile(1, "notat.dat", #MODE_READ)
notat$, len = FileToString("notat.dat")
CloseFile(1)
EndIf
OpenFile(1, "notat.dat", #MODE_WRITE)
WriteLine(1, notat$)
CloseFile(1)