How to Search for Text in Files on Windows 11

Published by Nyau Wai Hoe - Updated on

In Windows 11, you can search for files that contain certain texts or contents using the default search in File Explorer or Start. However, if the files and folders are not indexed by Windows, the search may take a very long time to complete depending on the number of files it has to search. You can configure Windows 11 to index the files and folders for faster searches, or you can use a software instead to perform much more powerful searches and replaces. This guide will show you how to use a powerful tool called grepWin to search for text and contents in files on Windows 11 with much faster search speed.

Search for Text or Contents in Files on Windows 11

GrepWin is a powerful tool that allows you to search for files containing certain text in any folder or directory on Windows 11. You can even search an entire drive for files that containing a certain text you want to search for. It has all the tools you need to filter your search results such as file size filter, types of files, etc. It also supports regular expressions that some users may find useful when performing advanced searches.

GrepWin also allows you to do search and replace. You can search for certain texts in files and let grepWin to automatically replace them with other texts.

You can download grepWin from https://github.com/stefankueng/grepWin/releases/.

If this is your first time downloading an app or tool from GitHub, here’s what you should look for. On the download page, look for the post marked with “Latest“, which usually appear as the top most post. Then, click on an installer under Assets of that release. For example, if you are using 64-bit Windows 11, select grep-Win-x64.msi.

Optionally, you can also download the grepWin portable version if you don’t want to install the software. Portable means that you can use the software by directly running its executable file without the need to install the software first. However, installing grepWin can add a “search with grepWin” to the Windows context menu which allows you to quickly search with grepWin by just right-clicking a folder or a drive.

How to search for files containing text in Windows 11 using grepWin

After installing grepWin, to search for files containing certain text in a folder or drive, right-click on the folder or drive, select Show more options > Search with grepWin.

Search for files containing text in Windows 11

Alternatively (especially if you run grepWin portable version), you can directly run grepWin and manually enter the path to the folder you want to search in the “Search in” field.

To search for text in files in the selected folder, enter the text you want to search for in the “Search for” field. Then, click on the Search button. The search results will then return all the files that contain the string you’ve entered. Make sure the All sizes under Limit search is selected if you want to search all the files regardless of their file sizes.

How to search for text in files Windows 11

To search and replace using grepWin, in the grepWin window, enter a text you want to search for in the “Search for” field, and enter a text you want to replace with in the “Replace with” field. Then, click on Replace. GrepWin will then search the folder for matching texts and automatically replaces them whenever the stated text is found. It is recommended that you select the “Create backup files” before replacing to allow the tool to automatically create a backup whenever it has to replace texts on a file.

Search and replace text in files Windows 11

Tip: You can also use the advanced filters in the tool to further narrow down your search results. For example, you can limit your search by file size. Simply select “Size is” under Limit search, and select either “less than“, “equal to” or “greater than” option, and finally enter a file size you want to filter.

Search files by size date and type of files

There are other filters such as “search case-sensitive”, include or exclude system items, subfolders, hidden items or binary files, date created of files, file names match, and regular expressions.

Description for sharing: A guide on how to search for files containing certain text or contents in any folder or directory in Windows 11.

Categories: AppWindows 11