Microsoft Scripting Runtime
Windows Script Host
Most commonly, the TextStream object represents a text file. As of Windows Script Host 2.0 and VBScript 5.5, however, it also represents any input/output stream, such as standard input, standard output, and the standard error stream. Depending on the precise character of the I/O stream, you can open a TextStream object to read from, append to, or write to the stream. The TextStream object provides methods to read, write, and close the text file or I/O stream.
When dealing with files, note that the TextStream object represents the file’s contents or internals; the File object represents the file’s externals or the file as an object in the filesystem.
The TextStream object is one of the objects in the File System object model; for an overview of the model, including the library reference needed to access it, see the File System Object Model entry.
The availability of TextStream object properties depends on the precise character of the TextStream object; some properties are available only when the stream is opened in read mode (indicated by an R in the Availability field); others are available in both read and write modes (indicated by a RW in the Availability field). All of the following TextStream object properties are read-only: ...