TextStream.Read()

JScript2.0+Syntax

							textstream.Read(num)

Description

The Read() method of an instance of the TextStream object reads the num characters passed to the method starting at the current pointer position.

Example

Listing 9.129 opens two files. The first file is for reading a string from, while the second file is written to—one character at a time—as the script iterates through. The result is that the file opened for reading is written to the second file. This file can be executed with the Windows Scripting Host (wscript.exe or cscript.exe).

Listing 9.129 Using the Read() Method
 // Create a FileSystemObject object var myFileSysObj = new ActiveXObject("Scripting.FileSystemObject"); // Create a TextStream object to read from and ...

Get Pure JavaScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.