<% '================= Content Container ============================ filename1=request.querystring ("filename1") if len(request.querystring ("filename1")) < 2 then filename1="forms" end if 'Option Explicit Const Filename="forms.txt" ' file to read Const ForReading=1, ForWriting=2, ForAppending=3 Const TristateUseDefault=-2, TristateTrue=-1, TristateFalse=0 ' Create a filesystem object Dim FSO set FSO=server.createObject("Scripting.FileSystemObject") ' Map the logical path to the physical system path Dim Filepath Filepath=Server.MapPath(Filename) 'Response.Write Filepath if FSO.FileExists(Filepath) Then ' Get a handle to the file Dim file set file=FSO.GetFile(Filepath) ' Get some info about the file Dim FileSize FileSize=file.Size ' Open the file Dim TextStream Set TextStream=file.OpenAsTextStream(ForReading, TristateUseDefault) ' Read the file line by line addforms="" formnumber=0 Dim Line Do While Not TextStream.AtEndOfStream if formnumber>0 then addforms=addforms&" or " end if formnumber=TextStream.readline ' Add code here to create the where statement addforms=addforms&"charindex('" & formnumber & "', left(fbvDocumentListing.FileName,12))>0 or charindex('" & formnumber & "', left(fbvDocumentListing.Name,12))>0 " Loop Set TextStream=nothing 'Response.Write addforms & "

" Else Response.Write "

File forms.txt does not exist

" End If Set FSO=nothing %>