maniootek Posted February 15, 2010 Share Posted February 15, 2010 File 'test.txt' contains few lines of text, like here: Line1 Line2 Line3 and when I run this code: $file = FileOpen("test.txt", 1) If $file = -1 Then MsgBox(0, "Error", "Unable to open file.") Exit EndIf FileWrite($file, "Something") FileClose($file) my file would now looks like that: Line1 Line2 Line3Something Now, how to erase all lines in that text file and put this "Something" text to ONLY line 1 after run this code it should looks like that: "Something" (only 1 line) Link to comment Share on other sites More sharing options...
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!Register a new account
Already have an account? Sign in here.Sign In Now