Hi,
Please check the following code:
<%
Option Explicit
'Code to display data from the current text-based logfile
Dim objFSO, oInStream, sLine, sSeg
'Define the constants used by the FSO
Const Forreading = 1
'Create an instance of the FSO
Set objFSO = CreateObject("Scripting.fileSystemObject")
'Check the file exists
If objFSO.fileExists( Server.MapPath( "stuff.txt" ) ) Then
'Open a file for reading
Set oInStream = objFSO.OpenTextfile( Server.MapPath( "stuff.txt" ), Forreading, False )
Do Until oInStream.AtEndOfStream
sLine = oInStream.ReadLine
sSeg = Split( sLine, "," )
Response.Write "<b>A</b>: " & sSeg(0)
Response.Write "<b>B</b>: " & sSeg(1)
Response.Write "<b>C</b>: " & sSeg(2)
Response.Write "<br>"
Loop
oInStream.Close
Set oInStream = Nothing
Else
Response.Write "file not found!"
End If
Set objFSO = Nothing
%>
Om Prakash
|