Monday, 15 October 2012

Search File Contents

OK, so you're running Windows 7 and you want to find all files that contact a certain piece of text.

It's simple isn't it - just go to the folder type in the text at the top right, and all the files are magically returned?  I know there are 2 files in C:\TEMP containing the text elephant so I go to the folder and type in elephant in the top right


Strange - no matching items..  Ah - I need to click on File Contents so that Windows 7 now searches the file contents and not the file names



Only 1 file found?  What's happening here?

By default Windows 7 will only search contents for certain file types.  You can add to this list of file types by performing a whole lot of messing about but what a lot of fuss just to do something the OS should do out of the box.

If you're an advanced user you might be thinking DOS is the way to go.  So go to the Command Prompt, type in CD \TEMP and then find "elephant" * and hey presto


What?  Access Denied!  This is a problem that is even harder to fix than adding to the list of file types that will be searched.

So where does this leave us?

There's a simple solution.  Forget Windows 7's built-in search and use the excellent and highly respected text editor Notepad++.  Just install, run and to bring up the search dialog - from the top menu select Search and then Find in files..

Enter the text you want to search for and the directory to start searching from


Click on Find All


Perfect, it shows both files and as a bonus double-clicking the text will open the file at the location where the search text is.

Now why couldn't Windows 7 make it that easy?  Maybe it'll be fixed in Windows 8..

1 comment:

  1. Now we all know that Windows 8 doesn't help that. What a waste... one of most underrated features of design in Windows 6.x.

    Search never work. ever.

    ReplyDelete