FSO and OpenTextFile
Im attempting to write data to a textfile during runtime. My script is as follows:
Set fso = CreateObject("Scripting.FileSystemObject")
Set tf = fso.OpenTextFile("c:\File1.txt", ForWriting, True)
tf.Write("This is a test message")
But when I go to the location, File1.txt is not created, and even if I create it, the message isnt written to the file. I cant figure out what Im doing wrong...
Re: FSO and OpenTextFile
Doh! Nevermind... I had forgotten to declare the constant for the 'ForWriting' flag..