Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I need to write a script to check the size of the disk that our backups store to on client machines and decide if it needs to delete the oldest backup set so the current days backup can run.

Is there a correct way to have Windows launch a script before the Windows Backup runs, or do I just use a batch job to run the script with a time before the Windows backup does its stuff.

share|improve this question
    
To be clear.. You're asking for the best way to run the script before the backup, not for the actual Size-check script itself, right? :) –  techie007 Jan 26 '12 at 23:53
add comment

1 Answer

I don't think you'd get a windows event indicating "Backup starting". What you're better off doing is create a scheduled task that runs your script to check folder size and then use the following command wbadmin start systemstatebackup -backuptarget (backup location you resolved in the last step)

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.