rtnMichael
Programmer
Hey, I'm trying to read in a txt file to grab information in VBscripting, but when I read a line that begins with a "'", it doesn't grab the line....here's what I have including the file being read...am I doing something wrong?
----MyDummy.txt
'dummy config file for Test
PARAM
'11010
12010
13010
13020
------------
dim ParmArr(2000)
set FSObj = Server.CreateObject("Scripting.FileSystemObject"
Set TSObj = FSObj.OpenTextFile ("MyDummy.txt", 1)
max_parms = 1
while not TSObj.AtEndOfStream
readvar = TSObj.Readline
ParmArr(max_parms) = readvar
max_parms = max_parms + 1
wend
----This prints out
lines 1 and 2 nothing
line 3--- PARAM
line 4 nothing
line 5--- 12010
line 6--- 13010
line 7--- 13020
-----------------
Lines 1 and 4 should be printing out the line, but it fails to do so I would assume because of the tick mark at the beginning...Any clues???
Thanks
Mike
----MyDummy.txt
'dummy config file for Test
PARAM
'11010
12010
13010
13020
------------
dim ParmArr(2000)
set FSObj = Server.CreateObject("Scripting.FileSystemObject"
Set TSObj = FSObj.OpenTextFile ("MyDummy.txt", 1)
max_parms = 1
while not TSObj.AtEndOfStream
readvar = TSObj.Readline
ParmArr(max_parms) = readvar
max_parms = max_parms + 1
wend
----This prints out
lines 1 and 2 nothing
line 3--- PARAM
line 4 nothing
line 5--- 12010
line 6--- 13010
line 7--- 13020
-----------------
Lines 1 and 4 should be printing out the line, but it fails to do so I would assume because of the tick mark at the beginning...Any clues???
Thanks
Mike