Sun Chili!Soft ASP Sun Chili!Soft
ASP Sun Microsystems

 

VBScript TextStream Object

The VBScript TextStream object facilitates sequential access to a file.

Methods: VBScript TextStream Object

VBScript TextStream Object Close Method

Closes an open stream.

VBScript TextStream Object Read Method

Reads a specified number of characters from a stream.

VBScript TextStream Object ReadAll Method

Reads an entire stream.

VBScript TextStream Object ReadLine Method

Reads an entire line from a stream.

VBScript TextStream Object Skip Method

Skips a specified number of characters when reading a stream.

VBScript TextStream Object SkipLine Method

Skips the next line when reading a stream.

VBScript TextStream Object Write Method

Writes a specified string to a stream.

VBScript TextStream Object WriteBlankLines Method

Writes a specified number of newline characters to a stream.

VBScript TextStream Object WriteLine Method

Writes a specified string and newline character to a stream.

Properties: VBScript TextStream Object

VBScript TextStream Object AtEndOfLine Property

True if the file pointer is before the end-of-line marker.

VBScript TextStream Object AtEndOfStream Property

True if the file pointer is at the end of the stream

VBScript TextStream Object Column Property

The column number of the current character in the stream.

VBScript TextStream Object Line Property

The current line number of the stream.

Syntax: VBScript TextStream Object

TextStream.{property | method}

The property and method argument can be any of the properties and methods associated with the TextStream object.

Note

In actual usage, TextStream is replaced by a variable placeholder representing the TextStream object returned from the FileSystemObject.

Remarks: VBScript TextStream Object

In the following code, a is the TextStream object returned by the CreateTextFile method on the FileSystemObject:

Set fs = CreateObject("Scripting.FileSystemObject")

Set a = fs.CreateTextFile("c:\testfile.txt", True)

a.WriteLine("This is a test.")

a.Close

VBScript TextStream Object WriteLine Method and VBScript TextStream Object Close Method are two methods of the TextStream object.

Copyright 2002 Sun Microsystems, Inc. All rights reserved. Legal Notice.