demonstration script that uses microsoft word to locate all the
.mp3 files stored on drive c of the local computer
复制代码 代码如下:
set objword = createobject(word.application)
set objdoc = objword.documents.add()
objword.filesearch.filename = *.mp3
objword.filesearch.lookin = c:\
objword.filesearch.searchsubfolders = true
objword.filesearch.execute
for each objfile in objword.filesearch.foundfiles
wscript.echo objfile
next
objword.quit