在视窗列举的特定类型的文件视窗、类型、文件

2023-09-04 03:01:53 作者:沉 沦゛

是否有原生(Windows API的)方法来列出特定类型的所有文件(如视频文件),pferably使用$ P $内置指数(一个Windows搜索使用)?

Is there a native (Windows API) method to list all files of a specific type (e.g. video files), preferably using the built-in index (the one Windows Search uses)?

只是为了澄清,我知道我可以使用基本的FS API通过扩展递归列出所有文件和过滤器。我希望有一个更快的方法,它使用Windows搜索的索引。

Just to clarify, I know that I can use basic FS API to recursively list all files and filter by extension. I want a much faster method which use the Windows Search index.

编程语言并不重要。如果你知道一个可能的解决方案给我一个例子,任何语言。

The programming language does not matter. If you know a possible solution give me an example in any language.

感谢

推荐答案

正如其他人提到,在使用Windows搜索SDK。

As others have mentioned use the Windows Search SDK.

下载的例子DSearch从该页面: http://archive.msdn.microsoft.com/windowssearch 并通过类型:视频作为userQuery

Download the example DSearch from this page: http://archive.msdn.microsoft.com/windowssearch and pass in type:video as the userQuery.