Re: Finder: Delete files
Re: Finder: Delete files
- Subject: Re: Finder: Delete files
- From: Paul Berkowitz <email@hidden>
- Date: Mon, 25 Jun 2001 02:34:06 -0700
On 6/25/01 12:37 AM, "Olivier Berquin" <email@hidden> wrote:
>
Hi all,
>
>
I would like to delete (in a folder) all the files that the date is not
>
"today". I've this, but it not work fine:
>
>
tell application "Finder"
>
delete (every file of folder (choose folder) whose ,
>
(modification date) < ((current date) - (1 * days))) -- 24 hours
>
-- empty trash
>
end tell
>
>
set midnight to date (date string of (current date))
tell application "Finder"
delete (every file of folder (choose folder) whose
(modification date) < midnight
-- empty trash
end tell
This won't work for subfolders or anything inside them, of course
--
Paul Berkowitz