There are those time when it is handy to be able to find a specific piece of text in a programing file.
This application allows the user to designate a initial file folder and traverses all associated folder looking for a specified file type.
Once the file specifications are retrieved each file is examined for the existence of the designated string. When the designated string is detected the file name, line number and the line’s contents are revealed to the user.
When the user clicks on the Find Text In Files on the Primary Menu Option the following dialog appears.
Next the user is prompted for the wildcard file specification. In this case we are looking at Pascal files thus the designation.
Next the user is prompted for the string to detect via the dialog below.
Key in the string to search for and tap the OK button. The following dialog will appear.
Here are all the occurrences of the detected string. In this example 690 file were used as input. There were a total of 187,757 lines of code searched in a matter of seconds.
In an similar example using more input there was 1,215 files with a total of 323,220 lines of code processed in a matter of seconds.
While the result are available when the user double clicks on a line containing a line number the file is opened in the viewer at the specified line number.
When the user clicks on a line that does not contain a line number the entire file is opened in the viewer beginning at the top of the document.
Notice the full file specification is always listed at the top of the viewer.
A 32 bit executable program may be downloaded by clicking here.
A 64 bit executable program may be downloaded by clicking here.
The component documentation can be found by clicking here.
The source code may be found by clicking here.
Mr. Arch Brooks, Software Engineer, Brooks Computing Systems, LLC authored this article.