Full-text search for documents in a folder
October 19, 2021
What if you need to find a specific document among tens or hundreds?
If you know the name of the document, then searching is quite simple – many programs, including the standard Windows Explorer, can search by file name.
To find a file by name, open Windows Explorer (file manager), navigate to the folder where you want to search, and in the Search box, enter the file name or part of the name to find all files that match it:
Full text folder search
But what if we want to find a file by its contents? For example, we know the surname that is mentioned in the document.
If you are looking among text documents, then many programs can help you, for example, Total Commander and Double Commander can search by the contents of text files.
But if these are office documents, then things get more complicated, since .docx, .doc and other office formats are quite complex containers.
Fortunately, the most common Windows Explorer can do full-text search in all MS Office formats.
To search the contents of office documents, go to the folder where the files you want to search are located. In the Search box, enter your search word or phrase. Click on “Search options” and in the drop-down menu click “File contents”:
As a result, if there are many files, then the search will take much longer than the search by file names. But now you can find documents by words that are contained in the text of office files.
How to search by files in ZIP archives
If files are packed in ZIP archives, then by default they are not searched even if search by file contents is enabled.
To enable searching for ZIP archives, enter a search word, in the Search box, enter your search word or phrase. Click on “Search options” and in the drop-down menu click “Zipped (compressed) folders”:
These options are permanent and persist even after you close Explorer and restart your computer. If you usually search by filename (rather than content) and the search has become too slow for you, then disable these options in the same order as shown to enable them.
How to search by exact match. How to search by phrase
By default, documents containing any of the search words will be shown. In this case, spaces, periods and other punctuation marks are the separators between words. For this reason, it is impossible to find an exact phrase that consists of several words or includes periods and other symbols.
Putting the phrase in quotation marks will not change anything – documents containing at least one word will still be shown.
In Windows 10
Nevertheless, there is a solution, for this you need to use the construction ~="FIND IT"
To make it clearer, let's say we need to find documents containing the exact phrase “Exa.ct Phr.ase”, then we need to enter in the search bar:
In Windows 11
In Windows 11, the ~="FIND IT" construct still works to find an exact match. But the indexing of files greatly affects the search. For example, when indexing was enabled, the following features were observed:
- the ~="FIND IT" construct didn't work
- to search for an exact match of a phrase, it was enough to put it in double quotes
- search through archives did not work, although it was enabled
After disabling indexing of a folder, the search operation became similar to that in Windows 10. That is, if you do not know if indexing of the folder in which you are searching is enabled, then try both methods described in this article and see which one works.
- Full-text search in office files (Word) and archives – now it's easy! (100%)
- How to change the default web browser in Windows 11 (63.5%)
- How to install the latest PowerShell on Windows 11 (63.5%)
- How to check PowerShell version in Windows 11 (63.5%)
- How to install the Active Directory PowerShell module on Windows Server, Windows 11 and Windows 10 (60.5%)
- How to install Apache web server with PHP, MySQL and phpMyAdmin on Windows (RANDOM - 53%)