Board index » delphi » question about using Delphi to search directories for strings of data

question about using Delphi to search directories for strings of data

Can Delphi be used to search for a string of data in all files of a
directory (text files and/or Word Files), and list the results?  
'FindFile' in Word 6.0 does something like this but it is a bit
inconvenient to use. The 'GREP'
UNIX command accomplishes this pretty well but I'm wondering if
Delphi can be used to do this.  

Thanks for any responses.  

-- Gary L. Lewis  

 

Re:question about using Delphi to search directories for strings of data


Quote
Gary Lewis wrote:

> Can Delphi be used to search for a string of data in all files of a
> directory (text files and/or Word Files), and list the results?
> 'FindFile' in Word 6.0 does something like this but it is a bit
> inconvenient to use. The 'GREP'
> UNIX command accomplishes this pretty well but I'm wondering if
> Delphi can be used to do this.

> Thanks for any responses.

> -- Gary L. Lewis

Make it your self. You use the Findfirst/findnext functions to find
the files, and you can use the POS function to locate a substring in
a string.
Hope it helps.

Thomas Riedel

Other Threads