Re: Folder items to trash
Re: Folder items to trash
- Subject: Re: Folder items to trash
- From: Michelle Steiner <email@hidden>
- Date: Wed, 14 Jan 2009 21:52:28 -0700
On Jan 14, 2009, at 9:28 PM, Tony Bennett wrote:
I hope someone on the list can make quick work of this. I would
like to write a script that would run unattended ever morning to
move all files of a specific folder, older than 30 days, to the trash.
Here is the part of the script that will delete the files; you will
need to change the file, of course, to the one you want.
Someone else will have to write what is needed to trigger the script
at a specified time of day.
set FolderToBeProcessed to alias ((path to desktop as text) &
"untitled folder")
tell application "Finder"
delete (files of the FolderToBeProcessed whose modification date is
less than (current date) - 30 * days)
end tell
-- Michelle
--
Never play strip Tarot.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden