In windows 7 - I want to search for all files containing "A word or phrase in the file". The standard XP search box.

Anonymous
2009-12-06T19:24:59+00:00

In Windows 7 - I want to search/find all files containing "A word or phrase in the file".  The old standard XP search box.

I do NOT supply: file name; file type; drive letter; etc. - nothing.  

I tried searching for this - just can't find any discussion.  And of course, not having this search would be insane. It is precisely what we have a computer for. 

And no 3rd party programs are allowed.

Windows for home | Previous Windows versions | Files, folders, and storage

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
Answer accepted by question author
Anonymous
2010-08-19T18:11:15+00:00

I've been looking into this because I know the search has been failing for me.  I think the difference in whether Windows search works or not depends on the FILE EXTENSION which contains your search text.  For example, if you look for the word "spam", it will be found if it is in a whatever.doc file, or whatever.txt file.  However, if you were to rename the file to whatever.xyz, it will no longer find the word.

Here are all the steps I think you need to follow to actually search:

  1. Make sure that Windows 7 is actually going to search files with your extension, and it appears that using this list properly is important *whether or not you are looking in an indexed location*!!

    a.  Hit the start button and type "search" in the search box.

    b.  Select "Change How Windows Searches"

    c.  Hit "Advanced"

    d.  Select the "File Types" tab.

    e.  Make sure the file extension for the files you want to search in is on the list *and* is set to "Index Properties and File Contents" (yes, pick your jaw up off the floor).  I know this appears to be for file indexing, but it does seem to make a difference on whether you find the file in non-indexed locations as well.

    f.  Say "Ok" and exit all the dialog boxes

2.  Actually perform your search on the folder in question.  Depending on some other settings you may have to type "content: spam" to find "spam" *in* the files instead of files with the word "spam" in the name.  Alternately, if you press the "Alt" key when you're exploring in the folder, you can choose "Tools / Folder Options" go to the "Search" tab and select "Always search file names and contents".

If what I have written is actually correct, then IMHO Microsoft has coughed up the ball bigtime on this one.  Personally, I now recognize that I can't use the search feature, and I'm installing Cygwin so I can use "grep" to search the contents of files.  Not cool and not amused.

Good luck to all the searchers.

~Pete

Was this answer helpful?

100+ people found this answer helpful.
0 comments No comments
Answer accepted by question author
@CmdrKeene 90,631 Reputation points Volunteer Moderator
2010-09-19T13:39:48+00:00

There is an option that seems to match what you're looking for:


If this was helpful, please vote by clicking the green triangle. If it solves the issue, click Propose as Answer. Thanks!

Was this answer helpful?

20+ people found this answer helpful.
0 comments No comments
Answer accepted by question author
Anonymous
2009-12-09T00:08:07+00:00

To find "phrase in the file" type content:"phrase in the file" in the searchbox.

Was this answer helpful?

20+ people found this answer helpful.
0 comments No comments

364 additional answers

Sort by: Newest
  1. Anonymous
    2012-03-12T21:02:26+00:00

    I realize that this thread is several years old, and my expectation is that the search functionality in Windows 7 won't ever improve.  Further, I expect things to be equally bad, if not worse, in Windows 8.

    The fundamental problem here is that Microsoft has decided that it is OK to sacrifice consistent, deterministic behavior in favor of performance in the lowest-common-denominator search scenario.

    Here are a few declarations for Microsoft in regards to search.  I'm certain they will be ignored by Microsoft, but I'm going to take the time to write them out anyway:

    1. It is * NOT OK * to require me to wait minutes to hours for a background indexing operation to complete before I am presented with accurate search results on a given folder.  What if I just created 500 files during a software or hardware test and I need to know DETERMINISTICALLY, CONSISTENTLY, ACCURATELY, DEFINITIVELY which ones contain a given string?  Does anyone honestly believe that it is OK to return the wholly inaccurate "no results" when the true answer is "no results in the index last time I checked this location, which was ??? minutes/hours/days ago, maybe try back again later, in let's say ??? minutes/hours/days, and maybe, kinda sorta I'll have accurate results for you, unless of course it's a file type that I'm invisibly excluding just because"
    2. It is * NOT OK * to force me to find the magic combination of buried configuration settings in order to get search to behave the way that most people expect it to out of the box.  We're 19 pages into this thread and so far the consensus seems to be:

    2a. Explorer->Organize->Folder Options->Search->What to Search->Always Search File Names and Contents

    2b. Explorer->Organize->Folder Options->Search->How to Search->Don't use the index when searching in folders for system files

    2ab?. Is this applied on a per-folder basis?  If so, will applying at a higher level (such as my C: drive, or "my computer" guarantee that the settings are applied to all child folders and objects?  What about network shares?  Apparently I have no way of knowing for sure.

    2c. Control Panel->Indexing Options->Advanced->File Types->Manually add every single file type that you will ever conceivably want to search, without knowing in advance which files you will need to be searching tomorrow, oh and hope that Windows doesn't arbitrarily decide to revert this list back to defaults at some random later date just because.  But if that does happen, feel free to go back and manually re-add everything again, we're sure you don't have anything better to do with your time.

    1. It is *NOT OK* to take a feature that the entire world is familiar with, understands and relies upon, toss that feature out the window completely, and re-implement it in a way that is inconsistent, clunky, undocumented, unreliable, and I'll repeat INCONSISTENT.  Whether I get the results I need should not depend on per-folder settings, the status of a background index that I have no visibility into, 2-dozen hidden levers that need to be pulled in a specific way.  This is a brain-dead implementation!
    2. If your seasoned veteran users are suggesting that the only viable work-around to get a basic system feature to work the way they require is to: run a command line tool, install a 3rd party addon, or abandon your shiny new OS in favor of an older version or competing 3rd party OS... THEN YOU MIGHT HAVE A PROBLEM WORTH FIXING!!

    I'm sure this will fall on deaf ears, as have the 180+ other posts in this thread.

    Was this answer helpful?

    0 comments No comments