FSO的强大功能(9)
if isTxt(f1.name) then
if instr(f1.name,word)>0 then
seachResult = seachResult & "<div class='file' title='" & f1.path
seachResult = seachResult & "'><span class='fileIcon'>2" & "</span>"
seachResult = seachResult & "<input value='"
fName = getTxtName(f1.name)
seachResult = seachResult & fName & "' title='" & fName & "'>"
seachResult = seachResult & "</div>"
num = num + 1
else
set st = f1.OpenAsTextStream
'逐行读
Do While st.AtEndOfStream <> True
if instr(st.ReadLine,word)>0 then
num = num +1
seachResult = seachResult & "<div class='file' title='" & f1.path
seachResult = seachResult & "'><span class='fileIcon'>2" & "</span>"
seachResult = seachResult & "<input value='"
fName = getTxtName(f1.name)
seachResult = seachResult & fName & "' title='" & fName & "'>"
seachResult = seachResult & "</div>"
exit do
end if
Loop
st.Close
end if
end if
next
set fd = fso.GetFolder(theFolder)
for each fd1 in fd.SubFolders
seachWord fd1
next
end sub
sub showHelp
dim msg
msg = " 文本代码管理工具【IE5.5以上版本】" & vbcrlf
msg = msg & "------------------------------------------------" & vbcrlf
msg = msg & " 使用方法:放到文本类型的文件夹里面,双击运行。" & vbcrlf
msg = msg & "功能:" & vbcrlf
msg = msg & "1,快速浏览,预览CTRL+B,搜索文本类型的文件和代码;" & vbcrlf
msg = msg & "2,按DEL可以删除点中的文件和文件夹;" & vbcrlf
msg = msg & "3,可以修改文件名和文字内容,CTRL+S保存;" & vbcrlf
msg = msg & "4,可以创建文件CTRL+N并且编辑保存;" & vbcrlf
msg = msg & "5,文本编辑支持TAB和shift+TAB键;" & vbcrlf
msg = msg & vbcrlf
msg = msg & "作者:CSDN超级大笨狼[2005/1/18版本]" & vbcrlf
内容版权声明:除非注明,否则皆为本站原创文章。