Example Result:
The '8' in the following line is the mode:
Set f=fso.OpenTextFile(Server.MapPath("mynote.txt"),8,true)
mode 1 is ForReading
mode 2 is ForWriting
and mode 8 is ForAppending
The 'true' paramater is saying to create the file if it doesn't already exist.
Other methods of the textstream object (objFile), depending on the mode are:
objFile.Write(string)
objFile.Read(length)
objFile.ReadAll
objFile.ReadLine
fso.CreateTextFile("c:\mypath\newfile1.txt",true)
or
fso.CreateTextFile(Server.MapPath("newfile1.txt"),true)
|