通过fso查找文件夹中所有*.htm,*.asp (fpath=文件路径+文件名) 绝对路径(fpath) 和 相对路径存入数据库(urlpath),存入数据库,以后就不用再查找!
根据fpath排序;
set rs=conn.execute("select * from ftable order by fpath")
Set fso = CreateObject("scripting.FileSystemObject")
tmpurl=""
do while rs.eof=false
Set instream = fso.OpenTextFile(rs("fpath"), 1, False, False)
do While Not instream.AtEndOfStream
if instr(instream.ReadLine,"辽宁省")>0 then
tmpstr=tmpstr & rs("urlpath")
exit do
end if
loop
Set instream = Nothing
rs.movenext
loop
rs.close
set rs=nothing
set fso=nothing
可能有语法错误,仅供参考