<%
FileString = replace(Request("file"),"|","/")
' Set up constants
Const ForReading = 1
Const Create = False
' Declare local variables
Dim objFSO ' FileSystemObject
Dim TS ' TextStreamObject
Dim strLine ' local variable to store Line
Dim strFileName ' local variable to store fileName
strFileName = FileString
If len(strFileName)>9 and lcase(right(strFileName,9))<>"aaaaa.aaa" then
strFileName = strFileName & ".desc"
End if
Description=""
' Instantiate the FileSystemObject
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
if objFSO.FileExists(strFileName)=true then
' use Opentextfile Method to Open the text File
Set TS = objFSO.OpenTextFile(strFileName, ForReading, Create)
If Not TS.AtEndOfStream Then
Do While Not TS.AtendOfStream
strLine = TS.ReadLine ' Read one line at a time
Description = Description & strLine ' Add the line
Loop
end if
' close TextStreamObject
' and destroy local variables to relase memory
TS.Close
Set TS = Nothing
End If
Set objFSO = Nothing
%>