Re: File Mod Date
Re: File Mod Date
- Subject: Re: File Mod Date
- From: has <email@hidden>
- Date: Mon, 4 Nov 2002 18:18:23 +0000
Steve Savery wrote:
>
or whether there is a more refined
>
method for achieving the same result?
Filter the files of the folder using the Finder's 'whose' clause:
======================================================================
-------
--RELATIVE DATES
on midnightToday()
set d to current date
set d's time to 0
return d
end midnightToday
on midnightTomorrow()
set d to current date
set d's time to 86400 -- (86400 secs = 24 hrs, so rolls over
[NO-BREAK]to 12:00:00 AM tomorrow)
return d
end midnightTomorrow
-------
--FILTER FILES BY DATE
on listFilesModifiedBetween(folderRef, minDate, maxDate)
tell application "Finder"
return every file of folderRef whose [CONT]
(modification date is greater than or equal to minDate) and [CONT]
(modification date is less than maxDate)
end tell
end listFilesModifiedBetween
on listFilesModifiedToday(folderRef)
return listFilesModifiedBetween(folderRef, midnightToday(),
[NO-BREAK]midnightTomorrow())
end listFilesModifiedToday
-------
--TEST
tell application "Finder" to set folderRef to folder "ePix" of desktop
listFilesModifiedToday(folderRef)
======================================================================
Note: replace [CONT] above with AS's continuation character, Option-L.
HTH
has
--
http://www.barple.pwp.blueyonder.co.uk -- The Little Page of AppleScripts
_______________________________________________
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.