Im trying to write to a text file without deleting the existing text in the file....but when I use this method:
set FSO = Server.CreateObject("scripting.FileSystemObject")
set myFile = fso.CreateTextFile("C:\Inetpub\wwwroot\test.txt", true)
myFile.WriteLine("howdy)
myFile.Close
Const ForReading = 1, ForWriting = 2, ForAppending = 8
set fso = server.CreateObject("Scripting.FileSystemObject")
set f = fso.GetFile("C:\Inetpub\wwwroot\test.txt")
set ts = f.OpenAsTextStream(ForReading, -2)
Do While not ts.AtEndOfStream
myText = myText & ts.ReadLine
It writes over the text that was in the file before .
So my question is....how do I prevent that from happening and just add text to the existing text that is in the file.
Thx in advance