How to search for text

S

SomeOldGuy

I must be doing something wrong!

When I use Windows Search to search for text within a file, it works if the
file has a .txt extension but not if it's a .css, .html, .js or other file.

What I try is this (on Windows XP):

Click on "Start"
Click on "Search"

In the "All or part of the file name" field, I enter *.html or *.css

In the "A word of phrase in the file" field, I enter the text I am searching
for. This can be as simple as a single word, such as banana or peach.

In the "Look in" field, I choose "browse" and select the appropriate folder.

I click the "Search" button.

NO RESULTS EVER FOUND, but if I rename the files as *.txt and change that
entry in the "All of part of the file name" field, the seach is successful.

What am I doing wrong???

Thanks in advance for any advice. I have lots of non "text" files that are
in fact text (Notepad will open them with no trouble) but can't get Windows
Search to find anything unless the file is specifically a .txt file.

Thanks in advance for any advice offered.
 
O

Olórin

SomeOldGuy said:
I must be doing something wrong!

When I use Windows Search to search for text within a file, it works if
the
file has a .txt extension but not if it's a .css, .html, .js or other
file.

What I try is this (on Windows XP):

Click on "Start"
Click on "Search"

In the "All or part of the file name" field, I enter *.html or *.css

In the "A word of phrase in the file" field, I enter the text I am
searching
for. This can be as simple as a single word, such as banana or peach.

In the "Look in" field, I choose "browse" and select the appropriate
folder.

I click the "Search" button.

NO RESULTS EVER FOUND, but if I rename the files as *.txt and change that
entry in the "All of part of the file name" field, the seach is
successful.

What am I doing wrong???

Thanks in advance for any advice. I have lots of non "text" files that
are
in fact text (Notepad will open them with no trouble) but can't get
Windows
Search to find anything unless the file is specifically a .txt file.

Thanks in advance for any advice offered.

You're doing nothing wrong - this is "by design". Microsoft really messed up
with this one, IMHO: XP's search function will, by default, NOT search
within all file types. Check out the official griff at:

http://support.microsoft.com/kb/309173: "Using the "A word or phrase in the
file" search criterion may not work."

I'd recommend scrolling down to Method 2 - or, if you're comfortable editing
the registry, just make the following simple tweak, which I'll quote from
near the end of that page:

"...set the FilterFilesWithUnknownExtensions DWORD value to 1 in the
following registry key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ContentIndex"

The usual warnings about registry editing apply - be careful, take a backup,
caveat emptor, etc.

I just don't trust Windows to search "properly" since I first chanced upon
this; searching worked fine under Windows 2000, but then MS had to start
"improving" it. I now always use Agent Ransack
(http://www.mythicsoft.com/agentransack/) - it's far superior to XP's
utility in just about every respect, and is freeware.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top