Diablicolic Posted August 12, 2003 Posted August 12, 2003 I want to edit Log.txt within my startup path. But when I edit the Log.txt, it always starts at line 1, when I want the editing to start at the end line (where there is no text). This is on the top for the streamwriter: Private LogEditor As New System.IO.StreamWriter(Application.StartupPath & "/Log.txt") And then in my Load Form I got this: LogEditor.Write("Eradication Logs on...") LogEditor.Flush() This would write Log.txt, but it writes over my previous text that was on Log.txt :mad: How can I make it so that the StreamWriter starts writing where there is no text? Quote "Reality is fake, Dreams are for real"
csharpener Posted August 12, 2003 Posted August 12, 2003 hi, you could try in your constructor adding the bool true to allow append. The default as your code infers is to overwrite... Private LogEditor As New System.IO.StreamWriter(Application.StartupPath & "/Log.txt", true) Quote
Diablicolic Posted August 12, 2003 Author Posted August 12, 2003 :) Thank you csharpener Quote "Reality is fake, Dreams are for real"
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.