I dont remember where I found this... but found it useful.
Code:
Dim i, fso, f, f1, sf, BasePath, CalcResult, fNameArray()
BasePath = "T:\Backup Directory\"
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.GetFolder(BasePath)
Set sf = f.SubFolders
For Each f1 in sf
CalcResult = DateDiff("d",f1.DateCreated,Now)
if CalcResult > 30 then
ReDim preserve fNameArray(i)
fNameArray(i) = f1.Name
i = i + 1
end if
Next
For Each fName in fNameArray
FSO.DeleteFolder(BasePath & "\" & fName)
Next You should just need to change the BasePath, and the number of days old (CalcResult > 30).