How to search inside files on Windows 7

Most people know to search for files in Windows 7, you just click Start and type your keywords.  Fewer people realize you can also search for files based on certain properties by using search filters.

For example, if you want to find all photos that were taken on a specific date you can open your pictures folder, click the search box in the upper right corner and choose the Date taken: filter.

A mini-calendar opens letting you choose the date.

Windows 7 Search Filters Date Taken

Great, but what if you want to search inside all files for specific words?  Is there a way to do that in Windows 7?


Setting your Indexing Properties

Click Start and type this:

indexing options

The Indexing Options window jumps onto the screen

Windows 7 Indexing Options Window

Click the Advanced button to delve into the Advanced Options screen.

Next, choose the File Types tab and you’ll see the gamut of extensions Windows can index.  Make sure the extensions you wish to search are checked then choose Index Properties and File Contents.

Windows 7 Index Properties and File Contents

Hit OK to commit the changes.  Now when you search for files, text within the file types of the extensions you checked will be searched too.

In case you were wondering, indexing is a Windows service that provides rapid access to files to your files.  When Windows indexes your files it speeds up searching becausethe operating system compiles a catalog of your files which it ran reference faster than performing new searches from scratch.

Don’t forget about find.exe

You can also use the find command to search within files.  I probably should have added this to my list of command prompt hacjs; however, I wanted to keep that list small so left it out.

To use find, click Start, and enter cmd.exe.

You can view your command options by typing the following in the command prompt window:

find /?

Windows 7 Find command

Now before your eyes glaze over, I’ll be the first to admit that the above window is a bit esoteric.  The syntax seems perplexing and there’s no usage examples to follow.

This only serves to increase your trepidation as you wade through the thick, turbid waters of the command prompt swamp.

But hey, don’t worry – I’m here to make you dauntless and you’ll be traversing that swamp like a pro.

Follow me.

Let’s say you have a voluminous log that contains reams and reams of abstruse facts.  You want to search inside the log for a particular string to see when a security update was applied to your system.

Here’s what I typed:

find /I /N "KB2656410" C:\Windows\WindowsUpdates.log

The /I switch makes the search phrase case-insensitive so UPPER, lower, and camelCaseMatters are all the same to find.

The /N switch prints out the results with the line number in [brackets].

In the example below you can see I found entries for the Microsoft update named KB2656410 on line 2517, 5714, and a few other lines.

Windows 7 Find command switches

That’s it!

What do you think of the find utility in Windows 7?  Does it suck or is it pretty descent?


Connect with Vonnie on Twitter

Posted in How To, Windows 7 Tagged with: