devxlogo

Display a Partial Text File Using FSO

Display a Partial Text File Using FSO

This script reads specific lines of text from any text file and then stores the lines in an array that you can assign to a variable for data display.

 True    CurrLine = objTextFile.Line    If Cstr(CurrLine) = Cstr(myArr(i)) Then	myArr(i)=UCASE(objTextFile.ReadLine)        i = i + 1    Else        CurrLine = objTextFile.ReadLine    End IfLoop' Set variablesLine10 = myArr(0)Line12 = myArr(1)Line15 = myArr(2)Line17 = myArr(3)' Close & DestroyobjTextFile.CloseSet objFSO = NothingSet objFile = Nothing' Display DataResponse.Write "Line 10 reads: " & Line10Response.Write "Line 12 reads: " & Line12Response.Write "Line 15 reads: " & Line15Response.Write "Line 17 reads: " & Line17%>

devx-admin

Share the Post: