Demonstration script that reads the n-th line of a text file.

Visual Basic
Edit|Remove
Const FOR_READING = 1
strFilePath = "C:\scripts\test.txt"
iLineNumber = 5

Set objFS = CreateObject("Scripting.FileSystemObject")
Set objTS = objFS.OpenTextFile(strFilePath, FOR_READING)

For i=1 To (iLineNumber-1)
   objTS.SkipLine
Next

WScript.Echo objTS.Readline