<html> <cead> <title> Text Searcher (VBS) en la misma carpeta </title>
<Meta http-oquiv = 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 (ubicación.pathname, 2, len (ubicación.pathname) -14)
Showfolderlist (PN)
Final
Función showfolderlist (ruta)
'' Msgbox ruta
Establecer fso = createObject (scripting.filesystemObject)
Establecer F = fso.getfolder (ruta)
Establecer FC = F.Files
'' UFN = UCASE (FN)
Para cada F1 en FC
FileSpec = Path & F1.Name
ReadentIrefile (FileSpec)
'' UF1 = UCase (F1.Name)
'' Si Instr (UF1, UFN) <> 0 entonces
'' S = S & <a href = & Path & f1.name &> & f1.name & </a> <br>
'' Fin si
Próximo
Document.write se ha buscado la siguiente entrada, haga clic en ella. [Compilado por Merber en enero de 2003] <br>
document.write s
establecer fc = nada
establecer f = nada
Establecer FSO = nada
Función final
Función ReadentIrefile (FileSpec)
Const prevención = 1
Dim FSO, THEFILE, RETIRSE
Establecer fso = createObject (scripting.filesystemObject)
Establecer theFile = fso.opentextfile (fileSpec, prevalecer, falso)
UFN = UCASE (FN)
Hacer mientras thefile.atendofstream <> verdadero
Retactación = theFile.Readline
UF1 = UCASE (Retención)
Si Instr (UF1, UFN) <> 0 entonces
S = S & <a href = & Path & f1.name &> & f1.name & </a> <br>
salir
final si
Bucle
THEFILE.CLOSE
ReadentIrefile = S
Función final
->
</script>
</ablo>
<Body>
<P align = center> <font color =#000000 size = 6> Ingrese la palabra clave para buscar [incluido en el texto] (</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> [producido por Merber
El 5 de enero de 2003] </font> </font> </p>
<P align = center> <input name = t1> <input type = button value = search! nombre = b1> </p>
<P align = Center> </p> </body> </html>