Snippets

Here is your code snippet

Code


Read all lines in a file

Read all lines in a file

<%
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile("c:\testfile.txt")

count=0
do while not objFile.AtEndOobjFSOtream
count=count+1
strText=objFile.readline
response.write (count & strText & "<br>")
loop

objFile.close
Set objFile=nothing
Set objFSO=nothing

%>