Searching for text within files

R

Rick

I want to find files in a directory that contain the string
'syscolumns'. I know for a fact that several ordinary ASCII text files
(extension .SQL) contain that string. They're not hidden or system
files. I load up Search and in the 'A word or phrase in the file' edit
box I enter syscolumns. My other options:

'All or Part of the File Name' is blank
When Was It Modified = Don't Remember
What Size Is It = Don't Remember
Under 'More Advanced Options', everything is unchecked

I click Search and it doesn't find any files. Same thing with several
other strings I look for. Am I doing something wrong? It seems to work
fine when I'm looking for a string in the filename, just not for a
string inside the file itself.
 
R

Rick

Thanks; I did this and I'm still getting the same result -- no files.

It seems to ignore files with a .SQL extension when searching, even if I
specify *.SQL in the 'All or part of the filename' box.

If I make a copy of my file and give it a .TXT extension, then it is
able to see that string inside the file and return that file in the
results pane.

Hmmm...
 
P

Patrick Keenan

Rick said:
I want to find files in a directory that contain the string
'syscolumns'. I know for a fact that several ordinary ASCII text files
(extension .SQL) contain that string. They're not hidden or system
files. I load up Search and in the 'A word or phrase in the file' edit
box I enter syscolumns. My other options:

'All or Part of the File Name' is blank
When Was It Modified = Don't Remember
What Size Is It = Don't Remember
Under 'More Advanced Options', everything is unchecked

I click Search and it doesn't find any files. Same thing with several
other strings I look for. Am I doing something wrong? It seems to work
fine when I'm looking for a string in the filename, just not for a
string inside the file itself.

I use the excellent, fast and free utility, Agent Ransack, on the frequent
occasions when I have to do exactly what you seek. I don't bother with the
Windows search tools as they just don't work nearly as well or as quickly.

http://www.mythicsoft.com/agentransack/

HTH
-pk
 
K

Kelly

Hi Rick,

You can modify for .sql files. Read below....

Windows® XP has a known issue for not finding a number of File Types when
you do a Search for Files "containing text" or using the "A word or phrase
in the file" option. This can be remedied for many file types, but not all.

Download the VBS file below. Double click the file you just saved. You'll
be prompted to enter a file extension. If the PersistentHandler value is
correct, no changes will be made. If the PersistentHandler value exists,
but is different, no changes will be made. If no PersistentHandler value
exists, then it will be created.

Enable XP's Search to find text in files:
http://www.dougknox.com/xp/scripts/xp_persisthandler.vbs

Manual Edit:

To resolve this problem for other file types, install a program that
registers a filter for the file type that you want to search. If no program
that provides a filter is available, you can use the plain text filter for a
file type.

Go to Start/Run/Regedit and add a PersistentHandler key under the file type
key in HKEY_CLASSES_ROOT and set its (Default) string value name to the
following value: {5e941d80-bf96-11cd-b579-08002b30bfeb}

For example, to use the text filter provider for .pas files, the following
registry setting should exist:
HKEY_CLASSES_ROOT\.zzz\PersistentHandler\(Default) =
{5e941d80-bf96-11cd-b579-08002b30bfeb}

After you add this value to the registry, you must log off and then log back
on to make the change take effect.

Using the "A Word or Phrase in the File" Search Criterion May Not Work
http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q309173

--

All the Best,
Kelly (MS-MVP/DTS&XP)

Taskbar Repair Tool Plus!
http://www.kellys-korner-xp.com/taskbarplus!.htm

SupportSpace
www.supportspace.com/pages?aiu=kellyskorner
 
J

JS

A

Alan

Hello Rick,

Kelly has stated quite well the situation in the last sentence of her first
paragraph: "Windows® XP has a known issue for not finding a number of File
Types when you do a Search for Files "containing text" or using the "A word
or phrase in the file" option. This can be remedied for many file types,
but not all."

Frankly, it's not worth the time trying to get the native XP search to work
as it should. One of the first things I did when I got my first machine that
had XP on it back in 2001 was to install Agent Ransack as Patrick Keenan has
already suggested., at
http://www.mythicsoft.com/agentransack/

Alan
 
O

Olórin

Rick said:
I want to find files in a directory that contain the string
'syscolumns'. I know for a fact that several ordinary ASCII text files
(extension .SQL) contain that string. They're not hidden or system
files. I load up Search and in the 'A word or phrase in the file' edit
box I enter syscolumns. My other options:

'All or Part of the File Name' is blank
When Was It Modified = Don't Remember
What Size Is It = Don't Remember
Under 'More Advanced Options', everything is unchecked

I click Search and it doesn't find any files. Same thing with several
other strings I look for. Am I doing something wrong? It seems to work
fine when I'm looking for a string in the filename, just not for a
string inside the file itself.

I heartily concur with other posts recommending Agent Ransack, and hardly
ever use XP's own search function.

However, if you want to force it to search within all file types (not just
selected ones) and you're happy poking around in the registry, try changing

HKLM\SYSTEM\CurrentControlSet\Control\ContentIndex\FilterFilesWithUnknownExtensions

from 0 to 1.

Registry editing, so usual caveats apply, E&OE, YMMV. HTH!
 

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