Link to home
Start Free TrialLog in
Avatar of antonioking
antoniokingFlag for United Kingdom of Great Britain and Northern Ireland

asked on

VBScript to check if file has been modifed - send email if not

Please can someone provide or help me with a vbscript that can check if a specified file has been modified.
If the file hasn't been modified in the last hour then an email must be sent.

I plan only using the windows scheduler to run the script, this will check if a report has been updated and if it hasn't it will email me to tell me it hasn't been updated and therefore requires my attention

Thanks
Antonio
ASKER CERTIFIED SOLUTION
Avatar of SStory
SStory
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Another option would be to move or delete the report, and then just check for its existence--assuming the name would always be the same.  To do that, just change the
if DateDiff("h",DateLastMod,Now)>0 then

Open in new window

line to be
If not (fso.FileExists(strFilePath)) Then

Open in new window

Avatar of antonioking

ASKER

Thanks, great solution!