Home > Web Front-end > JS Tutorial > Use Word to Search for Files_javascript技巧

Use Word to Search for Files_javascript技巧

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-05-16 19:12:26
Original
908 people have browsed it

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


Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
Use hook
From 1970-01-01 08:00:00
0
0
0
mac use
From 1970-01-01 08:00:00
0
0
0
What's the use of this?
From 1970-01-01 08:00:00
0
0
0
Use import namespace problem
From 1970-01-01 08:00:00
0
0
0
use Think\Controller;report error
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template