如何以编程方式使用Windows File Explorer执行搜索? [英] How can I programmatically use Windows File Explorer to perform a Search?

查看:99
本文介绍了如何以编程方式使用Windows File Explorer执行搜索?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们的网络上有一个文件夹,我们要在其中搜索程序(包括子文件夹).我们要返回名称包含"String1"或"String2"或"StringN"的文件的列表.我们宁愿以编程方式打开资源管理器"窗口,并使用本机Windows文件浏览器查看与搜索结果匹配的所有文件.

We have a folder on our network that we want to search within, including subfolders, from our program. We want to return a list of files whose name contains "String1" or "String2" or "StringN". We would prefer to programmatically open an Explorer window and view all files that match the search results using the native windows file explorer.

这可能吗?怎么样?

谢谢!

推荐答案

您可以使用

You can use the .ms-search file format to express a saved search. If you open this file format it will launch a File Explorer with the search conditions applied.

如果已经打开文件浏览器窗口并应用了搜索,则可以使用功能区上的保存搜索"按钮将其保存.

If you already have a File Explorer window opened with a search applied, you can save that using the 'save search' button on the ribbon.

这篇关于如何以编程方式使用Windows File Explorer执行搜索?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆