BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Win XP Search for "File Containing Word" is Broken

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> comp.lang.pascal.delphi.misc
View previous topic :: View next topic  
Author Message
alanglloyd@aol.com
Guest





PostPosted: Fri Sep 09, 2005 3:10 pm    Post subject: Win XP Search for "File Containing Word" is Broken Reply with quote



I often wish to search for a word in a .pas file and the search
function in Win 98 works OK. Not so in Win XP (which I have just moved
to) which did not return known words in .pas files.

The story is that each file type to be searched for words has to have a
"filter" to generate a catalogue of all the words in the file (I
presume to throw out apparent "words" which are actually formatting or
garbage content).

Microsoft supplies filters only for its own file types (what other
types are there anyhow <g>). But one can utilize a plain text filter
and accept that incorrect and garbage content may occur.

The filter implements an IFilter interface and its GUID must be
specified in a "PersistentHandler" key of the HKCR/<filetype> key in
the registry.

Below is the content of a .reg file which does that for .pas and .dpr
files. You might have to reboot after double-clicking on this .reg file
in order to get it to work.

Usual disclaimer of any responsibility for any effect on your system
from using this suggestion.

Copy the contents into a .reg text file and double-click it in Windows
Explorer.

Alan Lloyd

Contents of PasDpr_Search.reg ...

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT.pasPersistentHandler]
@="{5e941d80-bf96-11cd-b579-08002b30bfeb}"

[HKEY_CLASSES_ROOT.dprPersistentHandler]
@="{5e941d80-bf96-11cd-b579-08002b30bfeb}"

Back to top
Paul Dunn
Guest





PostPosted: Fri Sep 09, 2005 3:44 pm    Post subject: Re: Win XP Search for "File Containing Word" is Broken Reply with quote



[email]alanglloyd (AT) aol (DOT) com[/email] wrote:

Quote:
The story is that each file type to be searched for words has to have
a "filter" to generate a catalogue of all the words in the file (I
presume to throw out apparent "words" which are actually formatting or
garbage content).

I turned off the indexing service. Works fine here now :-)

D.



Back to top
Michael Brown
Guest





PostPosted: Sat Sep 10, 2005 11:49 am    Post subject: Re: Win XP Search for "File Containing Word" is Broken Reply with quote



[email]alanglloyd (AT) aol (DOT) com[/email] wrote:
Quote:
I often wish to search for a word in a .pas file and the search
function in Win 98 works OK. Not so in Win XP (which I have just moved
to) which did not return known words in .pas files.

That's just the start of it ... it will often skip folders, insists on
searching zip files, suffers from both false positives (no idea how they
manage this one) and false negatives, and generally sucks. It seems to me
like they tried to make an intelligent (google-desktop style) search, but
failed completely resulting in something which is both useless for low-level
(Win2K and prior style) searching and also useless for intelligent
(google-desktop style) searching.

In fact, I hate it with such a passion that I spent a while writing a
high-performance replacement for it (see my "Hackish file -> string trick"
post for the fun trick it uses). For intelligent searching, I use the Google
desktop search. For low-level searching I use my own searcher. I don't think
I've used the Windows XP search program in quite a while now ...

[...]

--
Michael Brown
www.emboss.co.nz : OOS/RSI software and more Smile
Add michael@ to emboss.co.nz ---+--- My inbox is always open



Back to top
Marco van de Voort
Guest





PostPosted: Fri Sep 30, 2005 3:52 pm    Post subject: Re: Win XP Search for "File Containing Word" is Broken Reply with quote

On 2005-09-09, [email]alanglloyd (AT) aol (DOT) com[/email] <alanglloyd (AT) aol (DOT) com> wrote:
Quote:
I often wish to search for a word in a .pas file and the search
function in Win 98 works OK. Not so in Win XP (which I have just moved
to) which did not return known words in .pas files.

There is a perfect tool for this, delivered with nearly each Borland
product.

It is called "grep"


Back to top
alanglloyd@aol.com
Guest





PostPosted: Fri Sep 30, 2005 6:18 pm    Post subject: Re: Win XP Search for "File Containing Word" is Broken Reply with quote

I have no reference to grep in Delphi help or on my PC. Isn't it some
sort of Unix search engine. I'm familiar with regular expressions in
Delphi search (and in Brief) but I wanted a "content search of any
file" search not just a search within a single known file.

Alan Lloyd

Back to top
Henry Bartlett
Guest





PostPosted: Sat Oct 01, 2005 12:21 am    Post subject: Re: Win XP Search for "File Containing Word" is Broken Reply with quote

<alanglloyd (AT) aol (DOT) com> wrote

Quote:
I have no reference to grep in Delphi help or on my PC.

Grep.com came with BP6, BP7 and Delphi 1.

Delphi 4 has GNU Grep as grep.exe in the bin folder.

But you may like to try my freeware HABExam utility

http://www.hotkey.net.au/~hambar/habit/habutil.htm#juHABExam

--
Henry Bartlett
Delphi Links Page:
( http://www.hotkey.net.au/~hambar/habit/delflink.htm )




Back to top
J French
Guest





PostPosted: Sat Oct 01, 2005 8:54 am    Post subject: Re: Win XP Search for "File Containing Word" is Broken Reply with quote

On 30 Sep 2005 11:18:27 -0700, "alanglloyd (AT) aol (DOT) com"
<alanglloyd (AT) aol (DOT) com> wrote:

Quote:
I have no reference to grep in Delphi help or on my PC. Isn't it some
sort of Unix search engine. I'm familiar with regular expressions in
Delphi search (and in Brief) but I wanted a "content search of any
file" search not just a search within a single known file.

Grep came from Unix, but there are plenty of DOS versions

It will search multiple files

Personally I prefer the good old Norton Utilities TS and FF

Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> comp.lang.pascal.delphi.misc All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.