Text searcher in the same folder (VBS)

Source: Internet
Author: User
<HTML><HEAD><TITLE> Text Searcher (VBS) </TITLE> in the same folder
<meta http-equiv=content-type content= "text/html; charset=gb2312 ">
<script Language=vbscript id=clienteventhandlersvbs>
<!--
Dim FSO, F, F1, FC,FN,S,UF1,UFN
Sub B1_onclick
Fn=t1.value '
Pn=mid (Location.pathname,2,len (location.pathname)-14)
Showfolderlist (PN)
End Sub
Function showfolderlist (PATH)
"MsgBox Path"
Set fso = CreateObject ("Scripting.FileSystemObject")
Set f = fso. GetFolder (PATH)
Set FC = F.files
"Ufn=ucase" (FN)
For each F1 in FC
filespec= Path & F1.name
Readentirefile (filespec)
"Uf1=ucase" (F1.name)
' If InStr (UF1,UFN) <> 0 Then
"S=s &" <a href= "& Path & F1.name &" > "& f1.name &" </a><br> "
' End If
Next
document.write has searched for the following entry, click it. [Mo Bo prepared in 2003]<br> "
document.write S
Set fc=nothing
Set f=nothing
Set fso=nothing
End Function
Function Readentirefile (filespec)
Const ForReading = 1
Dim FSO, Thefile, retstring
Set fso = CreateObject ("Scripting.FileSystemObject")
Set thefile = fso. OpenTextFile (filespec, ForReading, False)
Ufn=ucase (FN)
Do While thefile.atendofstream<> True
RetString = Thefile.readline
Uf1=ucase (retstring)
If InStr (UF1,UFN) <> 0 Then
S=s & "<a href=" & Path & F1.name & ">" & f1.name & "</a><br>"
Exit Do
End If
Loop
Thefile.close
Readentirefile = S
End Function
-->
</SCRIPT>
</HEAD>
<BODY>
<p align=center><font color= #000000 size=6> Please enter the keyword to search for [included in the body] (</font><font
Related Article

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.