This VBScript may work for you.
Dim fso, f, f1, fc
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.GetFolder("J:\aaaa")
Set fc = f.Files
For Each f1 in fc
If DateDiff("d", f1.DateLastModified, Now) > 30 Then
f1.Delete
End If
Next
Set fso = Nothing
Set f = Nothing
Set fc = Nothing
--
Regards,
Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft MVP [Windows NT/2000 Operating Systems]
"Jeff Jones" <(E-Mail Removed)> wrote in message
news:000d01c38123$ef39d8d0$(E-Mail Removed)...
> Are there any out of the box utilities that will delete
> files based on their timestamp for WIN2k? I could do it
> with robocopy or xcopy, but do not want to copy any
> files. I just want to complete some log cleanup. Thanks
|