Rawns Posted July 31, 2009 Posted July 31, 2009 Hay all. There is a scheduled task in place that makes a back up of the SIMS and FMS databases. I am looking to get a script together that checks to see if the backup was successful. The backs are compressed into a zip file. I was thinking that the script could check to see if there are 2 zip files in the backups directory with today's date? The backups are given a specific name with the date in the file name. Preferably, a batch or VBS file would be ideal for this. Would this be a good way to do this? Any suggestions would be appreciated.
ChrisH Posted July 31, 2009 Posted July 31, 2009 It would be fairly straight forward using VBS all you would need would be a line of code that checked the number of files in a folder and that folder name would be variable according to the date. Something like objFolder = "c:\MyBasePath\" + date Set objFso = Createobject( "Scripting.FileSystemObject" ) Set objFolder = objFso.GetFolder(strFolder) If( Err.Number <> 0 ) Then Exit Function End If n = objFolder.files.count if n = 2 then 'alert code here end if Thats off the top of my head and a quick paste from google. You should make it check the file types as well.
mac_shinobi Posted July 31, 2009 Posted July 31, 2009 Hay all. There is a scheduled task in place that makes a back up of the SIMS and FMS databases. I am looking to get a script together that checks to see if the backup was successful. The backs are compressed into a zip file. I was thinking that the script could check to see if there are 2 zip files in the backups directory with today's date? The backups are given a specific name with the date in the file name. Preferably, a batch or VBS file would be ideal for this. Would this be a good way to do this? Any suggestions would be appreciated. In your opinion or even after doing some RTFM'ing what do you think would be the best way to check this ? Once you know post back with how you would do this and one of us can see if we can help.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now