Most of us are used to being able to search for a specific phrase in Google by putting the phrase in “quotation marks”. This is a simple thing to do, and very useful for narrowing down searches.
In databases you can use Boolean search terms such as ‘AND’, ‘OR’, etc. These are also mostly self-explanatory – with the caveat that you NEED TO USE CAPITALS or else they will not work.
What is not so obvious is how to search for a phrase in Windows Explorer. It is quite simple, but not at all intuitive. As usual, there are answers out there, and I found a forum post by a certain ‘robarthur’ with the explanation.
Here are the steps:
- Open Windows Explorer
- Type the following string in the search box: content:”your phrase”
- (Replace ‘your phrase’ with whatever you are searching for)
- You will see the colour of the text changes to light blue – I assume this means Windows recognises this as a specific instruction
- You will then see the results below in the usual manner
Here is a screenshot:
Edit 30/9/2019: I have just noticed comments saying that this doesn’t work. I just tested it (Windows 10, 64bit) and it still works for me. Not sure why it’s not working for some people. Maybe just make sure you have the colon and the quotation marks all in the right place.
Hello. Thank you for your tip but it does not work on my Windows 10. When I use the above solution it returns all the documents which contain any of the words used in the string.
Doesn’t seem to work on Windows 10 x64 bit.
My tests show that the files containing “Malaysian” or “nationalism” will be listed.
Nope – this does not work. when I do this, it just returns every file with contents “your” OR “content”
Does not work
I use Notepad++ to search for a phrase within files.
I want to be able to filter by a phrase in the filename.
The description for using content:”blah1 blah2″ returns files with either blah1 or blah2 in the file.
Windows File Manager doesn’t respect the quotes because this returns the same results as just typing blah1 blah2 in the search box.
What is the keyword for searching in a file name?
name: is the keyword
Due Cee! You rock! Thanks! Use “name”, not “content”. You can see in the OP’s search result it does not even work for him as it is returning any and all phrases with the word Malaysia in them.
filename: also seems to work in Win11
Worked great for me! Thank you so much! I use Windows 10 Pro on a 64-bit system, but with an older Office package.
Now all I need is to figure out how to get rid of the jumping cursor problem.
Does not work!
Step 2 should read:
“Type the following string in the search box: content:=”your phrase”
(Replace ‘your phrase’ with whatever you are searching for)”
This works for me. It needs the equals sign after the colon.
YOU GOT IT!! The = sign did the trick!!! Thanks!!!!!!!!!!!!!!!!!!
Perfect!! thank you!
Finally an answer that works thank you
Quotations seem to be irrelevant. I think the search for content:”my content” retrieved files with content:my AND content:content
You need to put the quoted phrase in TWICE
That is: “my content” “my content”
Rather than “my content”
Microsoft motto: it’s counter-intuitive, that’s how we roll!
Source: https://answers.microsoft.com/en-us/windows/forum/windows_10-other_settings/windows-10-how-to-search-an-exact-phrase-in-file/fe03bf9f-35a0-4b15-95b8-c9d80ac567ee
Thanks, this works spawning from VB.NET using shell() to explorer.exe. Cost me a couple hours trying to figure this out.
To search for a file which had the exact phrase (eg Part A) in its file name and to avoid getting a result with only Part or only A, I changed the command to filename:”your phrase” and it worked.
I guess content:”your phrase” will search for the contents in the files and the above command searched only for the exact filename.
Windows 10 64 bit.
Thank you!! This worked for me
Thank you! Finally a suggestion that worked!
Worked for me, thanks! Win10 Education 64-bit
Found it: ~=”your search text”. It works for my Windows 10 version. Fixed!
~=”your search phrase”
Oh wow, Ionut, you’re awesome!!
~=”your search text” works for me on Win10/64bit!
I’ve been seeking this feature forever and have all sorts of workaround using other programs – such a hassle!! Now, I can find the files in Windows Explorer!! Thank you!!
It worked.Thanks
This works for me, thank you very much! ~=”your search phrase”
THAT works. *Very* helpful.
YES!!!! Thank you.
YES!!!! Thank you!
Yes… ~=”your search text” worked for me, all the other answers I’ve seen didn’t do the job.
lonut has the solution in my experience.
But WTF. ~= means approximately equal to. So we have a syntax that says look for files that approximately equal “your search phrase” and it returns file the have the EXACT phrase. Sure microsoft. That makes sense
*.pdf contents:~=”your search phrase”
Well done Ionut. Congratulations.
This is NOT “fixed”! This is some kind of crazy workaround. Windows search has always worked like every other search in the world, where you put quotes around a phrase to do a phrase search. And now, all of a sudden, it no longer works. WT????
That’s it!
Thank You! This is what I needed!
This worked for me too
Found it: ~=”your search text”. It works for my Windows 10 version. Fixed!
~=”your search phrase”
Make sure INDEXER is running int he background. Start it up automatically.
~=”your search text”
This is works for me. Thank you for sharing this.
The search works perfectly once it’s set up right. I had to set it up for work purposes.
The reason some people are not getting the results they expect is because you have to change the advanced search settings so that windows will search the content of files and not just the file name. Do a google search of how to do this, or go to this website which explains it very well: https://www.groovypost.com/howto/search-through-file-contents-windows-10/
appears how each of our searches work depends on what settings (check boxes) we all have set up in our individual search settings. When I enter my search string with spaces within double quotes (nothing else – not using content:) this works for my windows 10 pro 64-bit.
~=”your search text”
This works for me.
Used to work for me but doesn’t any longer. Real pain!!!!!! What is MS playing at?
~=”your search text” works for me
I have searched by => content : (“Text1″,”Text2”) for example content : (“python”,”AWS”), and it worked for me resulting content of both AWS and python files
Thanks, Ionuț , your solution is the only one that worked: ~=” search term ” . Specifically, I was looking to delete duplicate files that had automatically picked up a number (e.g., “(2)”) on the end of the filename. All my searches before returned any filename with a “2” in it, whether it had parentheses in it or not. A Windows Explorer file search for ~=”(2)” got exactly file names containing (2), but not file names containing just 2.
~=”your search phrase”
worked for me.
Thanks to everyone for your contributions.
Thank you sir, that has worked in my case on MS windows.
This does not work for me, as it returns files that contain all of the words in the phrase. In my case, I searched , and the search returned hundreds of files which include all of those words (employee, resource, and group), but not in a phrase. It gives me the results of rather than the results for .
Yes, I have a very large database of documents, so without being able to search an exact phrase, I am left with opening hundreds of documents to see which have the specific phrase. My guess is that those above who say it works probably have a smaller number of files they are searching and a search that is essentially a Boolean AND search is adequate for their needs.
Just came here to say I can’t BELIEVE that Microsoft decided to get into the search engine business. They are the WORST at this. There’s a reason they changed it from “Find” to “Search” years ago. Utterly useless.