Solved

Search all files in folder for word

Posted on 2012-04-08
3
425 Views
Last Modified: 2012-04-13
I want to search all files in a folder and its sub-folders for a word.  If it is found, the file name and the line number where it is found is added to a listbox.  Example code would be appreciated.

I am using Delphi XE.  Many thanks for your help.
0
Comment
Question by:rincewind666
3 Comments
 
LVL 26

Accepted Solution

by:
Sinisa Vuk earned 250 total points
ID: 37821622
0
 
LVL 19

Assisted Solution

by:Thommy
Thommy earned 250 total points
ID: 37835140
I suggest using GREP.EXE, the text search utility

You can start it from within your Delphi XE application by using ShellExecute.

Redirect output from GREP to a temporary file, analyze temporary output file and add results to your listbox...
0
 

Author Closing Comment

by:rincewind666
ID: 37843761
Thanks for your help.
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question