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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to enable Search to search within particular types of files? 1

Status
Not open for further replies.

carpeliam

Programmer
Mar 17, 2000
990
0
0
US
I know that Windows Search doesn't search for text within files of unknown types. I'd like to be able to search for text within .java files, or .properties files, etc, because these are ascii files.

All I've been able to find out so far is how to enable windows to search in all files. I imagine this would slow things down. What i'd like to do instead is add extension to a known list of searchable file extensions.

I tried adding ".properties" to the list of file types and associating it with text files (so a .properties file is opened in notepad now when i double-click it), but i tried searching for text that i knew was in a .properties file and i still don't get any results.

Any suggestions?

Liam Morley
Software Engineer
"light the deep, and bring silence to the world.
light the world, and bring depth to the silence.
 
This is a little tedious, but could be automated with a batch file or script. I don't know how many files you're referring to, so you might need extra disc space.

Do a search for all these file types. Copy, (don't move!) to a temporary folder. Change all the extensions to .txt. Then search within those files. Once found, you'd have the applicaple file names to look back for the original.
 
By the way, you might want to test that scenario for the correct results before trying to automate it.
 
You can install the Unix utilities for Windows (part of the power tools disk) and just run "grep." It works every time with all file types, even binaries if need be.


pansophic
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top