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

Searching text files

Status
Not open for further replies.

tlohan

Programmer
Sep 14, 2001
19
BE
Hi,

I have an application which contains over 400 text files. These files are displayed in a tree structure and can be expanded etc. Within these files are variables and their definitions, however, a variable can appear in more than one file. I am implementing a Search functionality to allow the user to find a particular variable, however, this is taking a lot of time.

Beyond opening each file and looking for the particular word is there any faster way to search for it. I need to go through all 400 files as I need to show what files this word appears in.

Can anyone help.

Thanks,

Tom

:-V
 
an idea would be to have an index file automatically generated and put at the top directory. or even mini-indexes at various levels of the directory structure pointing searchers in the right direction as they traverse through. or you could order the directory structure like a binary tree, so the searcher would know which directory to look in...
or even better would be to convert the directory structure to a relational database of some sort (like mySQL), and then have it much easier to search through. but that's no easy task. "If you think you're too small to make a difference, try spending a night in a closed tent with a mosquito."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top