I'm trying to write a file monitor that checks for the age of the file since it's been copied/created in a folder. I've seen some templates for file age within a range of dates, but I'm specifically trying to do two things:
1) monitor a directory and alert if the number of files in the directory goes over a threshold defined number
2) monitor the amount of time that those files stay in that directory (they're supposed to get moved out by one of our applications) and alert if they stay in there too long (defined threshold)
Thanks in advance as I am new to scripting and may just be overlooking something that could be very simple.
Kelly