t0ddie 0 Posted January 18, 2005 im too drunk to think FileWrite($file, "{bs}") i want to erase one character from the end of a file, yet this displays {bs} in the file instead im sure if i read the help file, yadda yadda yadda.. this is much more annoying though, and i live for that. (just kidding) anyways... whats the quick solution. my beer is getting warm thanks a bazigillioner drunken T0ddie (not sober) la la laaaaa ahahahaaaaa~!!!! im such a retard Valik Note Added 19 October 2006 - 08:38 AMAdded to warn level I just plain don't like you. Share this post Link to post Share on other sites
this-is-me 6 Posted January 18, 2005 (edited) You will have to read the whole file, erase the last character with StringLeft() and StringLen() then rewrite the file. You can also simplify the situation with filereadline and filewriteline I think. Edited January 18, 2005 by this-is-me Who else would I be? Share this post Link to post Share on other sites
t0ddie 0 Posted January 19, 2005 ok, sounds like alot of work for something simple. too bad you cant have the script read the file from the end first. i'll figure out some huge routine, and incorporate it into my slop. Valik Note Added 19 October 2006 - 08:38 AMAdded to warn level I just plain don't like you. Share this post Link to post Share on other sites
scriptkitty 1 Posted January 19, 2005 ok, just thinking from memory: filetrim("test1.txt",1); useage file, how many characters to delete func filetrim($_file,$num) $fileread=Fileread($_file,Filegetsize($_file)) $fileread=StringTrimRight($fileread,$num) filedelete($_file) filewrite($_file,$fileread) EndFunc AutoIt3, the MACGYVER Pocket Knife for computers. Share this post Link to post Share on other sites