SkipLine Method (Windows Script Host)
Skips the next line when reading from an input text stream.
StdIn text stream object.
A line is a sequence of characters that ends with a newline character. The StdIn, StdOut, and StdErr properties and methods work when running the script with the CScript.exe host executable file only. An "Invalid Handle" error is returned when run with WScript.exe. The position pointer moves forward to the point just past the next newline character. You cannot use the SkipLine method to skip backwards through a file. The SkipLine method is limited to the open for reading mode only (you cannot skip lines when writing to an output stream).
Legacy Code Example
The following code demonstrates the SkipLine method.
Dim StdIn, StdOut, Str1, Str2 Set StdIn = WScript.StdIn Set StdOut = WScript.StdOut Str1 = "" Str2 = "" For i = 0 to 4 StdIn.SkipLine Next i = 0 Do While Not StdIn.AtEndOfStream If i >= 2 Then StdOut.WriteLine Str1 End If i = i + 1 Str1 = Str2 Str2 = StdIn.ReadLine Loop