SoFunction
Updated on 2025-04-13

Text searcher in the same folder (vbs)

<HTML><HEAD><TITLE>Text Searcher (vbs) in the same folder</TITLE>
<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= ''
pn=mid(,2,len()-14)
ShowFolderList(pn)
End Sub

Function ShowFolderList(path)
''msgbox path
Set fso = CreateObject("")
Set f = (path)
Set fc =
'' ufn=ucase(fn)
For Each f1 in fc
filespec= path &
ReadEntireFile(filespec)
'' uf1=ucase()
'' if instr(uf1,ufn) <> 0 then
'' s=s & "<a href=" & path & & ">" & & "</a><br>"
'' end if
Next
"The following entry has been searched, please click it. [Compiled by Meber in January 2003]<br>"
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("")
Set theFile = (filespec, ForReading, False)
ufn=ucase(fn)
Do While <> True
retstring =
uf1=ucase(retstring)
if instr(uf1,ufn) <> 0 then
s=s & "<a href=" & path & & ">" & & "</a><br>"
exit do
end if
Loop

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 text] (</FONT><FONT
color=#000000 size=3>Ignore case</FONT><FONT color=#000000 size=6>)</FONT> </P>
<P align=center><FONT size=2><FONT color=#000000>[Produced by Merber
On January 5, 2003]</FONT>&nbsp;</FONT> </P>
<P align=center><INPUT name=T1><INPUT type=button value=Search! name=B1></P>
<P align=center>&nbsp;</P></BODY></HTML>