This will check all IMMEDIATE subfolders of C:\folderpath\ and if the folder hasn’t been modified in more than 90 days, it will delete it.
This will only work for subfolders on the local system you are running the script from.
Dim fso, f, f1, fc
Set fso = CreateObject(“Scripting.FileSystemObject”)
set f = fso.GetFolder(“C:\folderpath”)
Set fc = f.subFolders
For Each f1 in fc
If DateDiff(“d”, f1.DateLastModified, Now) > 90 Then f1.delete
Next
No tags
