StreamWriter Question - Help!!

spyrit

Member
Joined
Oct 17, 2003
Messages
18
Hi

I am using

[VB]Dim writer As New IO.StreamWriter("C:/FormatLineOutput.txt")
writer.Write(TextBox2.Text)
writer.Flush()
writer.Close()[/VB]

To write the output to a file. But I need to add to the file if it is executed a second time.

How can i add moe to this file.

Please Help!
 
open the file with
Code:
Dim writer As New IO.StreamWriter("C:/FormatLineOutput.txt", True)
the second parameter will append to the file if it already exists or create a new file if it doesnt exist.
 
How can I say

[VB]If a file is in a location then
writeline("blahblah")
Else
blablahblah

End if[/VB]

Im not sure how to say if a file is in a location
Please Help
 
Back
Top