LOGO

Windows Search: Find Text Within Files - A Comprehensive Guide

December 5, 2011
Windows Search: Find Text Within Files - A Comprehensive Guide

Expanding Windows Search Capabilities

For many users, Windows Search is the primary tool for locating files and initiating applications. However, the ability to search for specific text within files is, by default, restricted to a limited set of file types.

It is possible to broaden the scope of your searches to encompass other text-based files. We’ve previously demonstrated advanced search operators for Windows Search, and also covered modifying indexed files and rebuilding the search index.

Searching Web and Scripting Files

Do you need to locate text contained within .html, .php, .js, or other text-based web and scripting files? Windows Search can be configured to include additional file extensions in its indexing process with a straightforward procedure.

This method is compatible with Windows 10, 8, 7, and even Vista. While the visual appearance of the screens may vary slightly, the underlying process remains consistent across all versions.

Begin by accessing the Start menu, typing "index," and then selecting the "Indexing Options" result from the search results.

how-to-search-for-text-inside-of-any-file-using-windows-search-1.jpg

Within the "Indexing Options" window, click the "Advanced" button to proceed.

how-to-search-for-text-inside-of-any-file-using-windows-search-2.jpg

Configuring File Types for Indexing

In the "Advanced Options" window, navigate to the "File Types" tab. Choose the file extension you wish to include in content searches. Then, select the "Index Properties and File Contents" option located beneath the list.

The text displayed in the "Filter Description" column will automatically update to reflect the default filter used to open that particular file type. For instance, selecting the BAT extension will change the filter type to "Plain Text Filter."

how-to-search-for-text-inside-of-any-file-using-windows-search-3.jpg

If the desired file type is not present in the list, it indicates that no application is currently set as the default handler for that file type. To add the file type, enter the extension in the "Add New Extension to List" field and click the "Add" button.

By default, Windows Search will employ a plain text filter to search the contents of these file types, as no other application is associated with them.

how-to-search-for-text-inside-of-any-file-using-windows-search-4.jpg

Once the index has been rebuilt, searching for text within one of the newly included file types should yield results.

how-to-search-for-text-inside-of-any-file-using-windows-search-5.jpg

Always Searching Folder Contents

If you wish to consistently search within file contents for a specific folder, navigate to that folder in File Explorer and open the "Folder and Search Options."

how-to-search-for-text-inside-of-any-file-using-windows-search-6.jpg

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

how-to-search-for-text-inside-of-any-file-using-windows-search-7.jpg

Following the index rebuild, searches conducted within that folder will automatically incorporate file contents.

#Windows Search#file content search#search inside files#find text in files#Windows file search#text search