There ought to be a simple way, but my searches are coming up void. . .
The situation is simple. I have a text log file which is open and being
written to by another application. I wish to monitor the file for
particular entries and respond programmaticaly. I cannot open the file
via streamreader, or I get the typical exception that the file is being
used by another process. (I know this.)
I can create a filesystemmonitor object that will tell me when changes
are made, and then copy the file, and read the copy, but that will be
very inefficient. There MUST be a better way; I can always open the
file with NotePad (though subsequent updates do not show up in the
editor), how is this done? I don't see a corresponding temp file being
created anywhere. . .
Is there a elegant method available?
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!