Solved

Search all files in folder for word

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

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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

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…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

758 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

17 Experts available now in Live!

Get 1:1 Help Now