<% @LANGUAGE = "VBSCRIPT" codepage= "936"%>
<%
Dim St
St=timer ()
'*************************************************************
' ************* search hard disk files for class Searchfile *************
' ************* Call Method: *************
' *************set newsearch=new searchfile ' statement *************
' *************newsearch. Folder= "F:+e:" ' Incoming search source *************
' *************newsearch.keyword= ' assembly ' keyword *************
' *************newsearch. Search ' Start searching *************
' *************set newsearch=nothing ' end *************
' *************copyright (c) Drunk rain Indus Station *************
' *************http://btyz.51web.cn/************* ' *************************************************************
Class Searchfile
Dim Folders ' Pass in absolute path, multiple paths using + number connection, no spaces
Dim keyword ' incoming keyword
Dim objFSO ' Defines global variables
Dim Counter ' Defines global variables, number of search results
' ***************** initialization **************************************
Private Sub Class_Initialize
Set objfso=server.createobject ("Scripting.FileSystemObject")
Counter=0 ' Initialization counter
End Sub
'************************************************************
Private Sub Class_Terminate
Set objfso=nothing
End Sub
' ************** public members, calling methods ***************************
Function Search
Folders=split (Folders, "+") ' converts to arrays
Keyword=trim (keyword) ' Remove space before and after
If keyword= "" Then
Response.Write ("<font color= ' red ' > keyword cannot be empty </font><br/>")
Exit Function
End If
' Determine if illegal characters are included
FLAG=INSTR (keyword, "") or InStr (keyword, "/")
Flag=flag or InStr (keyword, ":")
Flag=flag or InStr (keyword, "|")
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service