Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to search for files--by looking for text within? 2

Status
Not open for further replies.

jsteph

Technical User
Oct 24, 2002
2,562
US
Hi,
I'm trying to use the Search functionality to find a file that contains a word or phrase.

There is a criteria textbox that says "A word or phrase in the file:"

...however, this does not seem to work if the file does not happen to have a .txt extension. I'm well aware that binary files may not have readable text, yet I'm looking at standard text files that just happen to have a different extension.

I want to, for instance, put *.bas in the "All or part of the filename", then find any .bas files with the selected text. I does not find it. I've even tried editing the registry so .bas opens with Notepad, but no change.

So how can I search a file that has text in it, using the 'containing text' criteria?
Thanks,
--Jim
 
I have also found this to be an issue.

[URL unfurl="true"]http://www.mythicsoft.com/agentransack/ [/url]

Agent Ransack is a free tool for finding files and information on your hard drive fast and efficiently. When searching the contents of files Agent Ransack displays the text found so you can quickly browse the results without having to separately open each file!

Agent Ransack provides compelling advantages over similar search tools:

* Regular expressions that allow complex rule based searches.
* Immediate contents results view.
* Various wizards to walk the user through the searching process.
 
Windows does this automatically, just not by default.

Start > Search > Change Preferences > With Indexing Service > Yes Enable Indexing Service > Change Indexing Service Settings (Advanced) > *in the Indexing Service window > Actions > Properties > Gerneration > TURN OFF Inherit Above Settings from Service > TURN ON both "Index Files with Unknown Extentions" and "Generate Abstracts" > Apply > OK > Close "Indexing Service" windows > click OK *in Windows Search Windows > All Files and Folders > in "A Word or Phrase in File", enter your search string > search.

FINITO!

Hope this Helps.

Neil J Cotton
njc Information Systems
Systems Consultant
 
Thank you all. I guess this is a more difficult problem than I expected.

The solution from NCotton is the easiest to implement, but I'm not thrilled about indexing service being on. I'd had it on before and--unless there's been a change--it creates 3 extra files in each and every folder, which is big-time clutter. Plus it (again, unless there's been a change) runs at random times and grabs the processor and disk to do it's indexing, which can be jarring.

I tried the sysinternals thing, and their example of command-line usage didn't match their documentation on how to use it, so it was difficult to get it to work, but it's also command-line driven which is more tedious to do.

So I went with the Agent ransack, which was an easy install and did the job quickly--plus it supports regular expressions, which is a big plus.

Thanks all,
--Jim
 
Jim,
You are right about the performance issue of the indexing service, however, you can limit it, but you can limit this, if you know that the only time you want to be doing these complex, non registered extention "in file" searches, you will be doing them in a certain folder, at what ever level, rather than the whole system. In the indexing service configuration, you can stop the indexing service on System and create a new catalogue for the folde you want Indexing to be enabled on, and then, follow my instructions, but with your new catalogue highlighted. This will severly cut down on the performance imparement.

In regard to searching infiles with Indexing OFF, you can search in any pre-registered plain text file extention.
These include (nearly a 100 different extentions), such as
-TXT
-HTM(L)
-CPP
-CS
-VB
-XML

all your conventional plain text filetypes are all included. Specialised ones (and yes, this does include standard microsoft specific apps, such as SMS/MOM configuration files) aren't included.

Hope this Helps.

Neil J Cotton
njc Information Systems
Systems Consultant
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top