CreateTextFile Method
Creates a specified file name and returns a TextStream object that can be used to read from or write to the file.
Syntax
object.CreateTextFile(filename[, overwrite[, unicode]])
Arguments
Remarks
The following code illustrates how to use the CreateTextFile method to create and open a text file:
var fs = new ActiveXObject("Scripting.FileSystemObject");
var a = fs.CreateTextFile("c:\\testfile.txt", true);
a.WriteLine("This is a test.");
a.Close();
If the overwrite argument is False, or is not provided, for a filename that already exists, an error occurs.
Copyright © 2000 Chili!Soft