Searching Within Files
I have tried searching within files in Windows 10 for a string. However, through testing, it seems that when the string being searched for does not have a space in front, it ignores it. E.g. if the text in the file is ‘The quick brown fox’ and I search for ‘quick’, it will list the file. But if the search string is ‘ick’, then the file will not be listed despite the text obviously being there. Any suggestions?
Replies (4)
Thank you for your interest in Windows 10.
I can understand, how frustrating it can be, when things don’t work as expected.
I’d be glad to help you.
I would suggest you to refer and follow the steps in the article, mentioned below and check, if it helps.
Search for files in File Explorer:
Note: applies to Windows 10.
Hope this information helps you. Kindly post back with the updated issue for further assistance.
Was this reply helpful?
Sorry this didn’t help.
Great! Thanks for your feedback.
How satisfied are you with this reply?
Thanks for your feedback, it helps us improve the site.
How satisfied are you with this reply?
Thanks for your feedback.
Thanks for your reply. Unfortunately, this doesn’t help. None of the suggestions on the page you linked show how to search for a string directly within a larger one. I.e. a test file that I tried started with the sole text ‘something’. When I searched for ‘some’ it listed the file. However, I then put letters around the text: ‘asomethingb’. Note that there is no space between the ‘a’ and the ‘s’. Entering the search string ‘some’ now, does not list the file. If I did not know the characters preceding the search string, I would not be able to find the file. From past experience, I know I was able to locate a file that way with previous versions of Windows. However, this version, at least, necessitates the need for a space pior to the search result in the file, or at least the preceding character to be known and therefore entered.
Was this reply helpful?
Sorry this didn’t help.
Great! Thanks for your feedback.
How satisfied are you with this reply?
Thanks for your feedback, it helps us improve the site.
How satisfied are you with this reply?
Thanks for your feedback.
Was this reply helpful?
Sorry this didn’t help.
Great! Thanks for your feedback.
How satisfied are you with this reply?
Thanks for your feedback, it helps us improve the site.
How satisfied are you with this reply?
Thanks for your feedback.
Thank you for the update.
By default, all of the most common files on your computer are indexed. Indexed locations include all folders included in libraries (anything you see in the Documents library, for example), e‑mail, and offline files. Files that aren’t indexed include program files and system files—files that most people rarely need to search.
Can I index my entire computer so all searches are fast?
You shouldn’t do this. If you make the index too large, or if you include system file locations (such as the Program Files folder), your routine searches will slow down. For best results, we recommend that you only add folders that you search frequently.
However, if you are still unable to perform the task as you used to in previous version of Windows, I would request you to leave your findings and feedback in the Feedback app on start page so the development team can work on it if required.
Hope this information is helpful. Please feel free to reply in case you face any other issues with Windows in future.
How to do a simple file search in cmd
I want to quickly search for a file given its name or part of its name, from the windows command line (not power shell). This is similar to opening explorer and using the search box at the top.
Note: dir can search based on a string template but it will not search in the subdirectories.
Note2: findstr can be used to search for a token inside files and has a recursivity flag; it’s funny that a more complex find can be easily discovered .
5 Answers 5
dir /s *foo* searches in current folder and sub folders.
It finds directories as well as files.
/s Lists every occurrence of the specified file name within the specified directory and all subdirectories.
searches for all txt file in the directory tree. Before using it just change the directory to root using
you can also export the list to a text file using
and search within using
EDIT 1: Although this dir command works since the old dos days but Win7 added something new called Where
will search for exe & dll in the drive c:\Windows as suggested by @SPottuit you can also copy the output to the clipboard with
just wait for the prompt to return and don’t copy anything until then.
EDIT 2: If you are searching recursively and the output is big you can always use more to enable paging, it will show — More — at the bottom and will scroll to the next page once you press SPACE or moves line by line on pressing ENTER
How To Make Windows 10 Search Through File Contents
Last Updated on December 29, 2019 by admin 23 Comments
We all know that Windows ships with a robust search engine and how it can be used to find apps, search the Windows Store, get results from the web, find files on the PC, and perform basic calculations. But did you know that you can configure Windows 10’s search to search through file contents?
Searching through file contents
Most PC users are under the impression that Windows 10 can’t search through file contents, and only the Microsoft Office is capable of doing it. But the truth is you can search for file contents using Start menu search. And if you’re wondering why you are unable to search for file contents, it’s because the ability to search for texts inside files is turned off by default.
And before we tell you how to configure Windows 10’s search to index file contents, you need to know two things. First, while it’s easier to configure the Windows Search feature to index file and file contents, Windows 10 might not be able to find file content that you’re searching for as fast as it does the job when you search for apps or files. Of course, this entirely depends on how many documents are there on your PC, and in most cases, you won’t see any delay.
Second, in order to configure Windows 10 to search through file contents, you need to rebuild the search index, and it might take hours depending on the number of files. When the rebuilding is in progress, the search might not work correctly.
Configuring Windows 10 to search through file contents
If you are ready to take the plunge, follow the given below directions to make Windows 10 search file contents so it can search through file contents for you.
Step 1: Type Indexing Options in Start menu or taskbar search box and press Enter key to open Indexing Options dialog. If you’re unable to launch Indexing Options this way, open Control Panel, change View by to Small icons, and then click Indexing Options.
Step 2: Once Indexing Options launched, click the Advanced button to open Advanced Options.
Step 3: Switch to File Types tab. Here, under “How should this file be indexed” section, select the second option titled Index Properties and File Contents.
Step 4: Finally, click the OK button. You will get a dialog with “Rebuilding the index might take a long time to complete. Some views and search results might be incomplete until rebuilding is finished” message. Click the OK button to continue to rebuild the Windows 10 search and index file contents.
Once the rebuilding is done (might take hours), you should be able to search file contents right from the search box, as shown in the screenshot at the beginning of this article.
Important: Even after enabling and configuring Windows 10 to search for file contents, you might not see results from contents when you perform a search from the Start menu or taskbar search box. On the results menu, click My stuff button (located at the bottom) to view document(s) with the content you’re searching for.
And if you feel that the Start menu opens slower on Windows 10, please go through our how to make the Windows 10 Start menu open faster guide.
Filed Under: Windows 10 Tagged: Tips
Related Articles
Comments
Curtis Long says
Thank you very much. I’d not thought of the fact my file extensions weren’t registered for Search. Such a duh moment. This posting was of great help and I appreciate it very much. Thanks again!
Pablo : what you say does not work on my PC – when I click in the SEARCH window nothing happens – I have to type the text in there;
Normunds : I agree with you – WIN XP is way better than WIN 10 crap, I use it on my old PC but because many new apps including web browsers do not work on WIN XP I have another PC with WIN 10 crap installed – just to be able to use these apps that do not work on WIN XP anymore. Bravo to so called programmers at Microsoft !
The search for text inside the files in WIN 10 now works for me but problem is that it ALWAYS searches for the text – even when I just want to search for FILENAMES.
I think that Microsoft on purpose makes this and many features cumbersome and close to useless – but why ? I have no idea.
… and this is the one of reason, why I still use windows XP. In XP I newer use third-part app for such a simple task. And now I must have some professor skill to do the same things in 10. And even with this skill I don’t get the result and MUST install third-part app with malwares, adds and high use of memory and CPU. Microsoft rather broke into the pieces than fix this problem….
Oh dear, this has been a feature since Windows 3.0 at the very least and people do not know? For me it has been very frustrating when MS “turns off” a feature and then hides the switch for you to turn it on. Especially, when they discontinue “intuitive” options and don’t give you that capability. Thank You so much for putting this out there. I would not have thought about indexing as a switch to turn on searching with in files. Since I had my drive indexed for searches I never would have thought an added switch was there for file contents
Go to the folder you want to search in and click on the serch bar at the upper right corner of the window. Before typing anything click on the ‘search’ tab at the top of the the folder, menu will drop, then click on ‘advanced options’ and simply check ‘content in file’ (I am translating from the Spanish version, maybe it reads different in English). It worked for me.
Ian Campbell-Kelly says
Hi
I’ve also been mystified by this, but I think I’ve solved it
When you’ve changed the global setting, there is also a setting for each individual file.
In Windows 10’s File Explorer, right-click on a file and select Properties.
At the bottom, next to Attributes, click on Advanced
In the next pop-up, you’ll see a check box called “Allow this file to have contents indexed in addition to file properties”
And what magic! The file gets searched…
The good news is that you can select a whole folder full of files and change the checkbox on them all at once
Charles Goodwin says
I can’t find how to search for a Word document containing a phrase. Things like content:”desired phrase” will find any document with either word in, or possibly any document with both words – but not the specific phrase.
(Plus, it takes forever to fail to work. Thinking about the lost productivity this must have caused worldwide is frightening. No wonder we can’t get to grips with important global issues…)
Georgia Dawg says
I am thoroughly disappointed with Microsoft’s Windows 10. When in File Explorer and I wish to search for a file, I enter a file name word or extension in the upper-right corner and it takes, it seems, forever to start up; the strange thing is that, sometimes, the system stops or begins to search BEFORE I completely enter the file name/extension. When it does finally start, it runs “forever’. I could go outside and smoke a pack of cigarettes but, I don’t smoke. Other issues aside, I think Microsoft Windows 10 is crap. This system just is not working for me; I’ll have to look for a solution elsewhere.
Is it me/my HP computer which presents these characters of this comment box in such a light-grey color that I have great difficulty in reading my comment or is it this website? Thank goodness that this site accepts pasting from Notepad.
XP had a great search function why did MS screw it up?
Gary Ostrower says
The difficulty of using the search command for Windows 10 is just weird. Why make a system less functional than its predecessor?
I am really happy with the search function on my iMac. But now we got new Computers, with Win 10, and now I am looking for a search app similar to the one build in Mac OS. VoidTools Everything is nice, if you know the file Name. But I have to search for words within files, and the Win 10 functionality is not functional…
@Argon David – Google Desktop was discontinued long ago. So that’s no longer an option, sadly.
Gordon Bell says
I have 10s of thousand .doc files and despite the setting, the indexer is not indexing their content It works fine for .docx, etc.
Any help on this one?
This just does not work. Bill Gates, I hope you fall down and skin your nose. And may the fleas of one-thousand camels infest your arm pits!
Grant Cruickshank says
@Maritza. I feel your pain. Or rather, I FELT your pain…
These days I use Everything Search by Voidtools. It’s FREE and – no joke – it will find your files INSTANTLY, before you’ve even finished typing! It’s one of the great secrets of using Windows. Absolutely indispensable.
It doesn’t search within files, though. But who cares when the file search itself is this good!
I have set the indexing to search for properties and file contents, and have rebuilt the index. (thanks)
However, even with kind:=document set as a filter, I’m still getting spurious results when searching files for specified text strings. If I search for a text string bounded with inverted commas, I get insufficient results, and if I search for the same text string without inverted commas, I’m getting lots of false positives. (The actual string I was searching for was
What I am doing wrong?
Argon David says
I used X1 and it was Superb. The X1 is for a trial period and once it expires I guess reinstall the trail version or go for paid version. Another Option is to use Google Desktop for searches.
This is where UNIX/Linux/BSD operating systems win as the most powerful operating systems in the world.
Microsoft’s poor executive decision making long ago and persisting to this day has given us a legacy search function that requires pre-indexing of everthing and it defaults to searching for filenames only.
I hate Windows 10! Can’t get the stupid search function to work without Cortana. I don’t want to use Cortana! I have disabled it. Just need to search “local” files on my PC. I have read through these replies, but can’t locate half of the stuff on my laptop. Something also seems to be wrong with my Bluetooth. It is paired, connected etc. but my files are not received by another (paired and connected) device, nor can I send any files using Bluetooth.
Absolutely hate Windows 10!
Not working for me either
I am having the same problem.
Have done as suggested above and done a rebuild (multiple times) but the search is only finding words in the subject line of emails but not within the email itself.
Please help. I’m tearing my hair out. For several days now.
This is the main reason, why I still use Windows XP! In XP it’s so simple and easy to find files by content!
In Windows 10 I must buy some extra apps to get same result.
Conclusion: XP is better that 10!
Dear Windows 10 people
This option is still not working for me
I am trying to do a literature review on about 50 journal articles and it is really annoying.
Can I please either revert back to a version that does search the file content or get some extra tips