• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Selecting files created on a given date
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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. |
----------------------------------------------------------------------


  • Prev by Date: Applescripting logout in OS 9.1 Multiple Users
  • Next by Date: Re: Is there any way to stop monitor refreshing
  • Previous by thread: Applescripting logout in OS 9.1 Multiple Users
  • Next by thread: if (thePath) contains similar text
  • Index(es):
    • Date
    • Thread