Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
<%@ Language=VBScript %>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
</HEAD>
<BODY>
<P><H3>Search Results</H3></P>
You have searched for: <B><%=Request("TextToSearch")%> on <%=Request("Select")%></B>
<hr>
<%
Dim strtextToSearch
Dim strselect
Dim strfile
Dim strcmd
strtextToSearch = Request("TextToSearch")
strselect = Request("Select")
'Now, we want to search all of the files
Dim fso
Const ForReading = 1
Set fso = Server.CreateObject("Scripting.FileSystemObject")
'Specify the folder path to search.
Dim FolderToSearch
If strselect = "DTC0B00BD5A3B8B" then
FolderToSearch = "K:\BP2000.log"
strcmd = "%comspec% /Q /C find /I " & Chr(34) & strTexttoSearch & Chr(34) & " " & FolderToSearch & " >K:\output.txt"
strfile = "K:\output.txt"
elseif strselect = "DTC0D0065A9FEE1" then
FolderToSearch = "L:\BP2000.log"
strcmd = "%comspec% /Q /C find /I " & Chr(34) & strTexttoSearch & Chr(34) & " " & FolderToSearch & " >L:\output.txt"
strfile = "L:\output.txt"
elseif strselect = "DTC0D0065EFC8FE" then
FolderToSearch = "M:\BP2000.log"
strcmd = "%comspec% /Q /C find /I " & Chr(34) & strTexttoSearch & Chr(34) & " " & FolderToSearch & " >M:\output.txt"
strfile = "M:\output.txt"
else
response.write "File does not exist!"
end if
Dim oWSH
Set oWSH= Server.CreateObject("WScript.Shell")
oWSH.Run strcmd, 0, True
set oWSH = nothing
Call getinfo(strfile)
Function getinfo(strfile)
IF fso.FileExists(strfile) THEN
response.write "file exists" & "<br>"
Set objTextStream = fso.OpenTextFile(strfile,ForReading)
'Read the content
strFileContents = objTextStream.ReadAll
Response.Write "<B>" & strFileContents & "</B>"
objTextStream.Close
Else
response.write "Please wait on file to be created."
WScript.sleep 20
Call getinfo(strfile)
End If
End Function
'Destroy the objects
Set objTextStream = Nothing
' Set objFolder = Nothing
Set fso = Nothing
%>
<center><a href="search.asp">Back</a></center>
</BODY>
</HTML>
Error Type:
Microsoft VBScript runtime (0x800A004C)
Path not found
/basepage/searchresult.asp, line 53