How do I search using a word or phrase in the file?

Anonymous
2009-12-03T17:44:54+00:00

I can't find anything using windows 7. How can I search using the old option of find "A word or phrase in the file" when i do not know the file name, type or location like one could do in XP and all previous versions?

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-19T02:00:08+00:00

Hi rayf1967,

I was back tonight, saw your post and tried a search in my .xlsx and .xls files.  They results were not as I suspected.  But is does work now.

I had left the "Allow files on this drive to have contents indexed in addition to file properties" unchecked.  This meant that my old index was being searched but new files or edits were not included.  When I finally went to the properties and allowed indexing for the disk I was able to search both .xls and .xlsx files for text both inside cells and inside text boxes.  I have edited my last post to include this observation.

Window 7 File & Directory Search Success

yahoo! I have finally been able to successfully search a text file for a string.  Thank you Lisa and Thahaseena I studied the links and then made some tests over a 5 hour period.  FYI, I have been getting by using the old DOS commands in .bat files.  Understanding the new search engine was much harder than learning RegEx in the 80's.

  1. BEWARE:  The disk property box known as:

"Allow files on this drive to have contents indexed in addition to file properties"

That check box controls the updating of the index database.  It must be checked to build or update an index that may be searched.

You may select the whole disk or just a subset of folders.

For disks:

rt-click folder / properties

For folders:

rt-click folder / properties / General tab / Advanced

I successully searched for file names and inside files with that box NOT checked but the results did not include files created or edited since the last time the index was built or in other words since the indexing was allowed.

  1. Searching in files was   N O T  the default setting after my W7 installation.  My system keeps all the files on a non system disk and that disk was not included in the search index settings. Not MS's fault.
  2. Searching in files REQUIRES that the disk/directories be specified:

Set the locations:

Control Panel/Indexing Options/Modify/ - go down and check any disk or dirs you want indexed.

Set the file types you want to allow searching inside:

control panel/indexing options/Advanced Options/File Types/Index Properties and File Contents - set as desired

The file types are grouped and there are filter categories they fall into.

Setting the .txt (Plain Text Filter) to "Index Properties and File Contents" will allow many other file types to be indexed.  The same is true for .doc (Microsoft Office Filter); that one will allow indexing for all Office files.

My 3GHz/4GB quad core indexed at 2500 items per second.  I let it run at night on my files disk as I estimated 3 hours to finish.

  1. Read about "Windows Search Advanced Query Syntax" it may help you a lot.
  2. W7 will post what looks like an error/complaint when you search suggesting you change your index settings.  This will happen even if you have set them so ignore/disable it.

E x a m p l e s  (all text left of - was typed/pasted into search box):

  1. test after:07/20/10 - this found all the file names with the string "test" in them with Date modified values greater than 07/20/10.
  2. *test*.txt after:07/30/10 - this found only the files of type .txt with "test" in the name and modifed today (07/30/10).
  3. *.txt contents: citabria after:07/20/10 - searched for the word citabria inside the text files modified after 07/20/10!
  4. *.docx contents: citabria after:07/20/10 - searched for the word citabria inside of the Word files modified after 07/20/10!
  5. *.xlsx contents: fardap - searched for the word fardap inside of all my .xlsx files; found in cells and text box.

Was this answer helpful?

3 people found this answer helpful.
0 comments No comments
Answer accepted by question author
Anonymous
2009-12-04T17:16:37+00:00

Andrewab,

Thank you for visiting the Microsoft Answers Community.

In Windows Explorer, click the search box, and start typing (or you can press the Windows logo key +F to bring up search). The search box filters the current view based on the text that you type. Files are displayed as search results if your search term matches the file's name, tags or other properties, or even the text inside a text document.

If you're searching for a file based on a property (such as the file's type), you can narrow the search before you start typing by clicking the search box, and then clicking one of the properties just below the search box. This adds a search filter (such as "type") to your search text, which will give you more accurate results.

If you aren't seeing the file you're looking for, you can change the entire scope of a search by clicking one of the options at the bottom of the search results. For example, if you search for a file in the Documents library but you can't find it, you can click Libraries to expand the search to the rest of your libraries.

Also, you can use the following syntax for searching: “*”.

For example:

i. *234033 -> searches for file which has the content 234033

ii. 234033*. -> searches for files which starts with 234033

Additional information can be found:

Find a file or folder

Windows Search Advanced Query Syntax

I hope this helps.


Lisa

Microsoft Answers Support Engineer

Visit our Microsoft Answers Feedback Forum and let us know what you think.

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments
Answer accepted by question author
Anonymous
2010-08-01T00:00:43+00:00

[ Please skip to my post farther down as this procedure has changed. ]

Window 7 File & Directory Search Success

yahoo! I have finally been able to successfully search a text file for a string.  Thank you Lisa and Thahaseena I studied the links and then made some tests over a 5 hour period.  FYI, I have been getting by using the old DOS commands in .bat files.  Understanding the new search engine was much harder than learning RegEx in the 80's.

  1. BEWARE:  The disk property box known as:

"Allow files on this drive to have contents indexed in addition to file properties"

By experiment does   N O T   mean that all the files and thier contents will be indexed for searching.  As a matter of fact, I am successully searching for file names and inside files with that box NOT checked.

  1. Searching in files was   N O T  the default setting after my W7 installation.  My system keeps all the files on a non system disk and that disk was not included in the search index settings. Not MS's fault.
  2. Searching in files REQUIRES that the disk/directories be specified:

Set the locations:

Control Panel/Indexing Options/Modify/ - go down and check any disk or dirs you want indexed.

Set the file types you want to allow searching inside:

control panel/indexing options/Advanced Options/File Types/Index Properties and File Contents - set as desired

The file types are grouped and there are filter categories they fall into.

Setting the .txt (Plain Text Filter) to "Index Properties and File Contents" will allow many other file types to be indexed.  The same is true for .doc (Microsoft Office Filter); that one will allow indexing for all Office files.

My 3GHz/4GB quad core indexed at 2500 items per second.  I let it run at night on my files disk as I estimated 3 hours to finish.

  1. Read about "Windows Search Advanced Query Syntax" it may help you a lot.
  2. W7 will post what looks like an error/complaint when you search suggesting you change your index settings.  This will happen even if you have set them so ignore/disable it.

E x a m p l e s  (all text left of - was typed/pasted into search box):

  1. test after:07/20/10 - this found all the file names with the string "test" in them with Date modified values greater than 07/20/10.
  2. *test*.txt after:07/30/10 - this found only the files of type .txt with "test" in the name and modifed today (07/30/10).
  3. *.txt contents: citabria after:07/20/10 - searched for the word citabria inside the text files modified after 07/20/10!
  4. *.docx contents: citabria after:07/20/10 - searched for the word citabria inside of the Word files modified after 07/20/10!

Happy Trails

Was this answer helpful?

0 comments No comments
Answer accepted by question author
Anonymous
2009-12-04T17:22:03+00:00

Hi Andreweb,

Welcome to Microsoft Answers.

Method 1:

The option to find the word or phrase has been removed from Windows 7. However you can use the search bar. Follow the steps mentioned below.

1.      Click on Start menu button and select Computer.

2.      On the top right corner of the screen you will see a Search Bar.

3.      Type in the word or Phrase in that Search bar and press enter and a list of files that contain that word or Phrase will be displayed in the Windows Explorer page.

Method 2:

I would suggest you to add your files in index. Follow the steps mentioned below.

To see the complete list of locations that are indexed, or to add locations to the index, open Indexing Options.

1.      Open Indexing Options by clicking the Start button and then clicking Control Panel. In the search box, type indexing options and then click Indexing Options.

The indexed locations are displayed in the Index these locations list.

For further reference check the article mentioned below.

Searching inWindows: frequently asked questions

http://windows.microsoft.com/en-US/windows7/Searching-in-Windows-frequently-asked-questions

Change advanced indexing options

http://windows.microsoft.com/en-US/windows7/Change-advanced-indexing-options

Hope this information is helpful.

Thank you and Regards.           

Thahaseena M

Microsoft Answers Support Engineer.

Visit our Microsoft Answers Feedback Forum and let us know what you think.

Was this answer helpful?

0 comments No comments

52 additional answers

Sort by: Newest
  1. Anonymous
    2010-06-19T13:07:36+00:00

    I am trying to search my computer for an excel file containing the word "richardson"in the content of the file, not just the title.  I am using windows 7 and office 2000.  I have set up a file for testing purposes with only the word richardson as the content and I still can not get the search function to find that file.  But surely windows 7 has that capability.

    If anyone can provide detailed instructions on how to conduct this search I would appreciate it.

    Was this answer helpful?

    0 comments No comments