Posted on 1997-06-19
I'm trying to write a small program that will read all the files in a directory search for a certain word, if the word is found inside the text file, the program will copy the line containing the word into another text file.
I have no problem doing this on ONE file, my question is, is there a way to make the program go throught all the files with a certain extension (let's say .txt) found in a directory.
ie : is there a way to give Delphi 2.0 program the path to the directory and tell it to execute a block of code on '*.txt'
so if the directory I want searched is c:\list
and it contains the 20 files (or more) with the 'txt' extension, I want the program to go throught each one of those 20 (or more)files.
Thanks in advance