I wonder if anyone can help me? I’ve got to write a script to monitor a file location for files containing error messages and send an email if an error message is found. I can do the email and search part but I’ve come up against a snag; I was going to run the script every 10 minutes or so (this is an arbitrary figure) but I only want to report the errors since the last time the script ran (so that I don’t keep reporting the same old errors). The concept I was going to use was to write a date to a file (called something like lastrun.txt) and compare the modified date of the files I’m searching for the string in against the contents of lastrun.txt and only search the files that are ‘newest’. Does the concept make sense? Is that the best way to do it?