Aliasghar Yaghoobzadeh
Aliasghar Yaghoobzadeh

Reputation: 1951

Searching just for filenames

I want to search for only filenames in "Windows Search API" by visual c++ . and i don't want to search for contents because its time consuming. does "windows search API" have this option ?

Upvotes: 0

Views: 91

Answers (2)

xMRi
xMRi

Reputation: 15365

The easiest way ist to use the "Name:myfiletosearchfor" Syntax with ISearchQueryHelper.

Here is a sample application. It is MFC but the specific parts are easy to convert. http://www.arlt.eu/blog/wp-content/uploads/2008/08/wssample.zip

Upvotes: 1

Jonathan Potter
Jonathan Potter

Reputation: 37152

As described (although not that well) in the Advanced Query Syntax reference, you can use:

filename:foo

to search for filenames containing "foo".

Upvotes: 1

Related Questions