Hi
I need help with an issue I have, the case is that we run Microsoft SQL server that runs maintanance plans each night. These jobs create a .bak file with format databasename_db_%year%date%time%.bak. I have read through many examples in the forum about getting the newest file and testing. But I must be honest, I am not a programmer and do not understand the scripts. What I would like to accomplish is to read the files in a directory and check that the newest file is not older that 1440 mins (24hours). This will give a good controll that the job is working.
You might not need to check the filename, just the date of creating of the newest file. In the folder there will only be backup jobs containing that database.
Hope someone has some pointers for me
br lars
Test Microsoft Maintanance plans
-
- Posts: 2832
- Joined: Tue May 16, 2006 4:41 am
- Contact:
I think, you may use "Count files" test method, which offers "Count files older than NN min" and "Count files newer than NN min" options:
http://www.ks-soft.net/hostmon.eng/mfra ... countfiles
Regards,
Max
http://www.ks-soft.net/hostmon.eng/mfra ... countfiles
Regards,
Max