Hi All,
I've searched this, but I did not find any solution.
So my problem is at the Close a file (Text).
I have to generate a file for a program, but when I close my file, the file.CLOSE procedure is put a 0D0A
of the end of file automatically. :shock:
Can I avoid this? :?: How can I truncate this last 2 bit when I close a file?
Thank you.
Andras
0
Comments
Just before closing the file, change the mode to binary and close the file.
I didn't try it out though.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
file.textmode(true);
file.create('Blubber.txt');
file.write('DoThis');//This add's 0D0A on the end
file.write('DoThat');//This add's 0D0A on the end
file.seek(file.len-2);//This sets the pointer 2 bytes back
file.trunc;//This cuts the file on the actual pointer
file.close; //This closes the file w/o adding more Data to it.
Yes, I tried this method but maybe I did something wrong, because the 0D0A is still there :-o
But I tried this It is "stupid" I think, but it is works :-o
I think rthsw that your code is OK!
Thank you to all![/b]