Re: File Mod Date
Re: File Mod Date
- Subject: Re: File Mod Date
- From: Paul Berkowitz <email@hidden>
- Date: Mon, 04 Nov 2002 08:53:07 -0800
On 11/4/02 8:27 AM, "Rob Jorgensen" <email@hidden> wrote:
>
At 4:12 PM +0000 11/4/02, Steve Savery wrote:
>
> Below is the AppleScript I've written. As you will see I am trying to
>
> get a list of files whose modification date is equal to the current
>
> day. However, although it compiles, when I run it I get the error:
>
>
>
> "Finder got an error: File document file Ice.jpg wasn't found."
>
>
>
> upon reaching "info for a" in line 5.
>
>
>
> tell application "Finder"
>
> activate
>
> repeat with myItem from 1 to number of files of folder "ePix"
>
> set a to file myItem of folder "ePix"
>
> set k to info for a
>
> set j to date string of modification date of k
>
> if date string of modification date of k is equal to
>
> date string of
>
> the (current date) then
>
> set myChosenFiles to myChosenFiles & a as list
>
> end if
>
> end repeat
>
> end tell
>
>
>
> Any ideas what I am doing wrong, or whether there is a more refined
>
> method for achieving the same result?
>
>
I don't know if it's causing the problem but "info for" isn't a
>
Finder command. The command belongs to Standard Additions.
Since you're already in the Finder, use its 'modification date' property for
the file. Why call 'info for'? Your list 'myChosenFiles' is going to be a
list of Finder files this way, mind you, not aliases. Or else do it all
outside the Finder after getting the folder contents (or use 'list folder'
to do that part).
--
Paul Berkowitz
_______________________________________________
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.