Re: Delete log files by date
Re: Delete log files by date
- Subject: Re: Delete log files by date
- From: Christopher Stone <email@hidden>
- Date: Fri, 16 Jan 2004 06:28:58 -0600
At 09:20 +0000 01/16/2004, Buttery, Ian wrought:
Does anyone know of a script which will allow me to delete log files
from a folder which are more than 2 days old?
______________________________________________________________________
Hello Ian,
Will something like this do the trick?
set theFolder to alias "Black Hole:Downloads - New:"
set theDate to current date
set dateOffset to theDate - 2 * days
set dateOffset's time to 0
tell application "Finder"
set fileList to files of theFolder whose creation date is greater than
dateOffset
if fileList is not {} then delete fileList
end tell
Chris
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.