Submitted By: Anton Kruglikov

Deletes all the files in a folder that have not been modified in the last 90 days.

Visual Basic
Edit|Remove
'===================================================================================
' Filename: example.vbs
' Author: Anton Kruglikov
' Company: Deltatelecom, Spb
' Date: Feb 27, 2006
'
' This file will check the timestamp of files in PestPatrol's quarantine directory
' and delete them if they were last modified more than 90 days ago.
'
'===================================================================================

date_mod=Date-90

Set FSO = CreateObject("Scripting.FileSystemObject")



For Each SubFiles in FSO.GetFolder("c:\PestPatrol").Files
				IF SubFiles.DateLastModified <= date_mod then
					SubFiles.Delete
				End IF	
Next