I have a folder...

This folder contains (multiple) *.txt files...

These *.txt files 'may' contain text that I would like to search for when I connect to my server. (eg: sample.text)

If the specified (sample.text) text was found during a search, I would like to echo a response to a particular #channel --- 'Sample.Text Found!'


Is this possible? To search the contents of a 'folder' for certain 'text' that may be contained within multiple *.txt documents?

If this is possible, I would also like to incorporate this search into an 'on connect' script. Nothing fancy, the simpler the better.

A final note: The 'Folder' automatically creates 'new' *.txt files daily with the file names corresponding to the date created. Eg: 030129.txt . If need be, I could settle for searching through the most recently created *.txt file within that folder on connect.

Thanks.