TextStream.ReadLine()

JScript2.0+Syntax

							textstream.ReadLine()

Description

The ReadLine() method of an instance of the TextStream object reads a line from a text file up to a newline character. Be careful when using this method with large files because it will use up a good amount of system memory.

Example

Listing 9.131 opens two files. The first file is for reading a string from, while the second file is written to. Each line is read and written one at a time. 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.131 Using the ReadLine() Method
 // Create a FileSystemObject object var myFileSysObj = new ActiveXObject("Scripting.FileSystemObject"); ...

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.