TextStream.Line

JScript2.0+Syntax

							textstream.Line

Description

The Line property of the TextSream object returns the line number of the current pointer position.

Example

Listing 9.128 opens a file for reading and a file for writing. The script iterates through each character of the first file, and then writes it and the line number to the second file. This file can be executed with the Windows Scripting Host (wscript.exe or cscript.exe).

Listing 9.128 Using the Column Property
 // Create a FileSystemObject object var myFileSysObj = new ActiveXObject("Scripting.FileSystemObject"); // Create a TextStream object to read from and one to write to var myInputTextStream = myFileSysObj.OpenTextFile("c:\\temp\\test.txt", 1, true); var myOutputTextStream ...

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.