Selecting files created on a given date
Selecting files created on a given date
- Subject: Selecting files created on a given date
- From: Michelle Steiner <email@hidden>
- Date: Thu, 12 Jul 2001 17:17:18 -0700
The request was on the applscript newsgroup.
>
Select all the files which were created the previous day (defined I
>
will label as yesterday) in a folder which will contain many files ie
>
a multiple select list.
Here's my solution.
--Set today to midnight of today
set today to date (date string of (current date))
--Set yesterday to 24 hours less than today
set yesterday to today - 1 * days
tell application "Finder"
set the selectedfiles to files of folder "dora:" whose ,
creation date is greater than or equal to yesterday ,
and creation date is less than today
end tell
"Dora" is the name of my hard disk. Substitute the path to the folder
you will use.
--Michelle
----------------------------------------------------------------------
| Michelle Steiner | We're not human beings having a spiritual |
| | experience. We're spiritual beings |
| email@hidden | having a human experience. |
----------------------------------------------------------------------