Solved vbs reading lines loop

August 31, 2012 at 05:51:28
Specs: Windows XP

I am getting input past end of line. I know im missing something easy. Please help.
Const ForReading = 1

Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objTextFile = objFSO.OpenTextFile("c:\wfm.txt", ForReading)

For i = 1 to 3
objTextFile.ReadLine
Next

strLine = objTextFile.ReadLine
Wscript.Echo strLine

objTextFile.Close


See More: vbs reading lines loop

Report •

#1
August 31, 2012 at 06:04:49
✔ Best Answer
Is "wfm.txt" less than 4 lines?

How To Ask Questions The Smart Way


Report •

#2
August 31, 2012 at 06:06:47
turns out someone helping me wiped the file contents. I fell dumb but thanks for the help.

Report •
Related Solutions


Ask Question