Solved

Search all files in folder for word

Posted on 2012-04-08
3
423 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to call a form that is in a DLL  from an application? 13 65
Downloading email attachments 2 67
Find and Replace Stream with 0s 8 57
Firemonkey webbrowser scrollbars ? 1 29
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

920 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now