on error resume next
dim swtitle,swconten,txtfile,txtsys
swtitle=inputbox("请输入歌名",1)
set txtfile=createobject("scripting.filesystemobject")
set txtsys=txtfile.createtextfile(swtitle&".txt")
txtsys.writeline swconten
msgbox"文件创建成功,点击打开文件输入歌词……"
txtsys.close
set open=createobject("wscript.shell")
set textfile=open.run("cmd.exe /c"&swtitle&".txt",0)
作用:歌词录入
on error resume next
road=inputbox("请输入位置","请输入位置","F:\back\1")
key=inputbox("请输入关键字","请输入关键字","请输入关键字")
set find=createobject("scripting.filesystemobject")
set subfolder=find.getfolder(road)
set rootdir=subfolder.files
for each filename in rootdir
set openfile=find.opentextfile(filename,1,0)
conten=openfile.readall
if instr(conten,key) then
set openfile2=find.opentextfile("result.txt",8,true)
openfile2.writeline filename
openfile2.close
end if
next
msgbox"点击显示搜索结果"
set see=createobject("wscript.shell")
set run=see.run("cmd.exe /c result.txt",0)
run.close
搜索方面的应用