Many of us rely on Windows Search to find files and launch programs, but searching for text within files is limited to specific file types by default. Here’s how you can expand your search to include other text-based files.

我们中的许多人都依赖Windows搜索来查找文件和启动程序,但是默认情况下,在文件中搜索文本仅限于特定的文件类型。 您可以通过以下方式扩大搜索范围,以包括其他基于文本的文件。

We have shown you some advanced search operators using Windows Search before and even how to change which files are indexed and how to rebuild your search index. But what about searching for text inside of .html, .php, .js, and other text-based web and scripting files? Windows search allows you to include other file extensions in its index with a few simple clicks.

我们已经向您展示了一些使用Windows Search的高级搜索运算符,甚至还介绍了如何更改被索引的文件以及如何重建搜索索引。 但是,如何在.html,.php,.js以及其他基于文本的Web和脚本文件中搜索文本呢? Windows搜索使您只需单击几下即可在索引中包括其他文件扩展名。

This technique works in Windows 10, 8, 7, or even Vista. The screens might look a little different, but it’s the same basic process on all versions.

此技术适用于Windows 10、8、7甚至Vista。 屏幕可能看起来有些不同,但是在所有版本上都是相同的基本过程。

Hit Start, type “index,” and then click the “Indexing Options” result.

单击开始,键入“索引”,然后单击“索引选项”结果。

In the “Indexing Options” window, click the “Advanced” button.

在“索引选项”窗口中,单击“高级”按钮。

In the “Advanced Options” window, switch to the “File Types” tab. Select the extension for the file type you would like to include in content searches, and then select the “Index Properties and File Contents” option under the list. The text in the “Filter Description” column should change to reflect whatever filter is used to open that file type by default. In our example, we’re selecting the BAT extension, so the filter type changes to “Plain Text Filter.”

在“高级选项”窗口中,切换到“文件类型”选项卡。 选择要包含在内容搜索中的文件类型的扩展名,然后在列表下方选择“索引属性和文件内容”选项。 默认情况下,“过滤器说明”列中的文本应更改以反映用于打开该文件类型的任何过滤器。 在我们的示例中,我们选择了BAT扩展名,因此过滤器类型更改为“纯文本过滤器”。

If you don’t find file type you’re looking for on the list, it means no app is set as the default handler for that file type. To add the file type, type the extension in the “Add New Extension to List” box and then click the “Add” button. By default, Windows Search will use a plain text filter to search the contents of those types of files, since another app is not associated.

如果在列表中找不到要查找的文件类型,则意味着没有应用设置为该文件类型的默认处理程序。 要添加文件类型,请在“将新扩展名添加到列表”框中键入扩展名,然后单击“添加”按钮。 默认情况下,Windows Search将使用纯文本过滤器来搜索这些类型的文件的内容,因为另一个应用程序未关联。

After the index is rebuilt, searching for text inside one of the new file types should now show results.

重建索引后,在一种新文件类型中搜索文本现在应该显示结果。

If you’d like to always search within file contents for a specific folder, navigate to that folder in File Explorer and open the “Folder and Search Options.”

如果您想始终在文件内容中搜索特定文件夹,请在文件资源管理器中导航至该文件夹,然后打开“文件夹和搜索选项”。

On the “Search” tab, select the “Always search file names and contents” option.

在“搜索”选项卡上,选择“始终搜索文件名和内容”选项。

After the index rebuilds, searches in that folder will automatically include file contents.

重建索引后,在该文件夹中的搜索将自动包括文件内容。

翻译自: https://www.howtogeek.com/99406/how-to-search-for-text-inside-of-any-file-using-windows-search/

如何使用Windows搜索在任何文件中搜索文本相关推荐

  1. python怎么建立替换_Python-如何搜索和替换文件中的文本?

    如何使用Python 3搜索和替换文件中的文本? 这是我的代码: import os import sys import fileinput print ("Text to search f ...

  2. python查找并修改文件中的内容_如何使用Python搜索和替换文件中的文本?

    如何使用Python搜索和替换文件中的文本? 如何使用Python 3搜索和替换文件中的文本? 这是我的代码:import osimport sysimport fileinputprint (&qu ...

  3. java 字符串查找程序_java-如何在JAR文件中搜索字符串

    java-如何在JAR文件中搜索字符串 我的应用程序基于Java EE构建. 我在此应用程序中大约有50个罐子. 是否可以搜索特定的关键字(实际上我想搜索关键字BEGIN REQUEST)? user ...

  4. 本地jar文件中搜索class

    2019独角兽企业重金招聘Python工程师标准>>> 本地jar文件中搜索class 下载地址: http://pan.baidu.com/netdisk/singlepublic ...

  5. boost::regex模块在 cpp 文件中搜索类定义,使用全局数据的测试程序

    boost::regex模块在 cpp 文件中搜索类定义,使用全局数据的测试程序 实现功能 C++实现代码 实现功能 boost::regex模块在 cpp 文件中搜索类定义,使用全局数据的测试程序 ...

  6. boost::regex模块在 cpp 文件中搜索类定义,使用 C++ Builder 闭包作为回调的测试程序

    boost::regex模块在 cpp 文件中搜索类定义,使用 C++ Builder 闭包作为回调的测试程序 实现功能 C++实现代码 实现功能 boost::regex模块在 cpp 文件中搜索类 ...

  7. boost::regex模块在 cpp 文件中搜索类定义,使用绑定成员函数回调测试程序

    boost::regex模块在 cpp 文件中搜索类定义,使用绑定成员函数回调测试程序 实现功能 C++实现代码 实现功能 boost::regex模块在 cpp 文件中搜索类定义,使用绑定成员函数回 ...

  8. boost::regex模块在 cpp 文件中搜索类定义,使用全局回调函数的测试程序

    boost::regex模块在 cpp 文件中搜索类定义,使用全局回调函数的测试程序 实现功能 C++实现代码 实现功能 boost::regex模块在 cpp 文件中搜索类定义,使用全局回调函数的测 ...

  9. boost::regex模块实现在 cpp 文件中搜索类定义的测试程序

    boost::regex模块实现在 cpp 文件中搜索类定义的测试程序 实现功能 C++实现代码 实现功能 boost::regex模块实现在 cpp 文件中搜索类定义的测试程序 C++实现代码 #i ...

最新文章

  1. MVC三层+会话层+线程安全+抽象工厂+DataBase First的基础框架
  2. 不允许对系统目录进行即席更新_还不懂Docker?一个故事安排的明明白白!
  3. 【LeetCode从零单排】No88.Merge Sorted Array
  4. 微软 python_微软推出 Pylance,改善 VS Code 中的 Python 体验
  5. Hexo瞎折腾系列(8) - 添加评论系统
  6. Java包命名规则_包命名规范
  7. 公路多孔箱涵设计_【公路常识中篇】公路路基边坡滑坡防护设计和预防
  8. 现金贷风控生命周期——贷前风控
  9. 这才是 Python 的 “72 变”玩法!
  10. python manager ulimit_Linux ulimit命令
  11. assert.h库学习
  12. 什么是软件著作权,怎么申请软件著作权
  13. 2022张宇考研基础30讲 第十讲 积分等式与积分不等式
  14. C 语言中的结构体(数据结构)
  15. 车辆销售系统用例_销售管理系统的UML分析与设计
  16. xcode打包ipa配置手动配置证书
  17. 【亲测可用】win7下移动硬盘无法访问,拒绝访问位置不可用时的解决方案!
  18. php target当前页面,href标签target=_blank属性的妙用
  19. Android 中利用XPosed拦截系统消息
  20. matlab共形映射程序,从共形映射角度看Schwarz引理

热门文章

  1. 嵌入式C语言基础(二)
  2. Docker-compose 常用命令及网络设置(五)
  3. 如何创建和谐的色彩系统
  4. 前端人员如何在linux服务器上搭建npm私有库
  5. 剑指offer java版(一)
  6. 开源自然语言处理工具包hanlp中CRF分词实现详解
  7. .net core高性能通讯开源组件BeetleX
  8. MpAndroidChart源码修改之饼状图添加标志线
  9. 基于React开发范式的思考:写在Lesx发布之际
  10. Liunx 安装mysql 5.6.16