Hey all, I'm trying to make a script that searches a text file for a
line, takes the number on that line and sticks in in a variable. I
have been working on it for about an hour with little success. I
figure I need to use the readall method, but is there a way I can get
the readline method to just grab the data off a certain line say like
line 16 so I do not need to search the whole txt? Heres what I have
so far.
im filesys, text, readfile, contents, svrtag
set filesys = CreateObject("Scripting.FileSystemObject")
set readfile=filesys.OpenTextFile("C:\BRUNET\LIB\SET_BRUNET.CFG")
strWordList = readfile.ReadAll
readfile.Close
strSearchWord = "ST_NUM" & vbCrLf
If InStr(strWordList, strSearchWord) = True Then Wscript.echo
strSearchWord
Any help would be greatly appreciated.