August 1999
Intermediate to advanced
1488 pages
72h 53m
English
textstream.Line
The Line property of the TextSream object returns the line number of the current pointer position.
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).
// 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 ... |
Read now
Unlock full access