CODE: [Copy to clipboard]
set fso=createobject("scripting.filesystemobject")
set folder=fso.getfolder(".")
for each file in folder.files
if lcase(right(file,4))=".txt" then
createfile(fso.getfile(file).name)
end if
next
msgbox "文件整理结束!",4096
sub createfile(a)
set file=fso.opentextfile(a)
s=file.readall
file.close
filename=left(a,len(a)-4)&".html"
set file=fso.createtextfile(filename)
file.write re(s)
file.close
end sub
function re(a)
set rex=new regexp
rex.pattern="<td>([\S\s]*)<h3 ALIGN=""CENTER""><font COLOR=""#000080""><strong>([\S\s]*)<hr>([\S\s]*)<p align=""right"">([\S\s]*)</td>"
rex.global=true
set mt=rex.execute(a)
for each m in mt
re=re&m&vbcrlf
next
end function
[