'================================================= =======
' This script removes SystemState
' backups from a directory that are older than 7 days.
'================================================= =======
Set fso = CreateObject("Scripting.FileSystemObject")
olddate = DateAdd("d", -7, date)
'@@@@@@@@@@@@@@@@@@@@@@@@@@@
'@ Change the path below to match your setup
'@@@@@@@@@@@@@@@@@@@@@@@@@@@
Set folder = fso.GetFolder("Your path here")
Set fc = folder.Files
For Each f1 In fc
if f1.DateLastModified < olddate Then
'wscript.stdout.write "Removing: " & f1.DateLastModified & vbtab & f1.name & VbCrLf
fso.deletefile(f1)
End if
Next