Use Word to Search for Files
更新時(shí)間:2007年06月15日 00:00:00 作者:
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
.mp3 files stored on drive C of the local computer
復(fù)制代碼 代碼如下:
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
相關(guān)文章
JavaScript檢查數(shù)據(jù)中是否存在相同的元素(兩種方法)
這篇文章主要介紹了JavaScript檢查數(shù)據(jù)中是否存在相同的元素(兩種方法),需要的朋友可以參考下2018-10-10
javascript 局部頁面打印實(shí)現(xiàn)代碼
Web打印有很多方式,水晶報(bào)表使用的恐怕比較多,但這東西是收費(fèi)軟件,老板說不能用:(。2009-08-08
JS控件ASP.NET的treeview控件全選或者取消(示例代碼)
本篇文章主要是對(duì)JS控件ASP.NET的treeview控件全選或者取消的示例代碼進(jìn)行了介紹,需要的朋友可以過來參考下,希望對(duì)大家有所幫助2013-12-12
詳解JavaScript對(duì)數(shù)組操作(添加/刪除/截取/排序/倒序)
這篇文章主要介紹了JavaScript對(duì)數(shù)組操作,文中通過示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧2019-04-04
小程序?qū)崿F(xiàn)文字循環(huán)滾動(dòng)動(dòng)畫
這篇文章主要為大家詳細(xì)介紹了小程序?qū)崿F(xiàn)文字循環(huán)滾動(dòng)動(dòng)畫,文中示例代碼介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下2021-06-06

