programming-examples/asp/More_Code_Snippets/Read all lines in a file.asp

15 lines
328 B
Plaintext
Raw Normal View History

2019-11-18 14:25:58 +01:00
<%
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
%>