' Collection of code snippets by Arne Vajhøj 
' (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
Set fso = CreateObject("Scripting.FileSystemObject")
Set dir = fso.GetFolder("C:\")
For Each f in dir.Files
    If DateDiff("d", f.DateLastModified, Now()) > 7 Then
        WScript.Echo f.Name & " " & f.DateLastModified
        ' f.Delete
    End If
Next
Set dir = Nothing
Set fso = Nothing
