Do you want to monitor a particular file extension, or a specific pattern in the file?
If it's a file pattern, you'll have to install a filter driver on top of the filesystem driver.
If it's a file extension, you could also use a filter driver, but the easier way is to use the FileSystemWatcher components.
Read up on
this.[
^]
Note that you can only monitor file systems which support monitoring. This normally includes all locally mounted file systems, and network drives where the server is running on Microsoft Technology ( So no Appleshare, NFS, consumer SAN, etc...)