Re: Sort an alias list by date - but result = alias list?
Re: Sort an alias list by date - but result = alias list?
- Subject: Re: Sort an alias list by date - but result = alias list?
- From: Paul Berkowitz <email@hidden>
- Date: Mon, 13 Nov 2000 17:31:00 -0800
On 11/13/00 2:00 PM, "cris" <email@hidden> wrote:
>
How can i sort an alias list by date?
>
>
{alias "Mac HD:file 1", alias "Mac HD:file 2", alias "Mac HD:file 3"}
>
>
I can do it via the Finders sort function, but the result is a list of
>
Finder file references which are much too slow if i work with this list
>
later (because the Finder is every time involved when such a reference is
>
used).
>
>
Is there any other possibility to sort an alias list by date in a way that
>
the result is still an alias list (a pure path list would be also fine)?
Akua Sweets (two different commands):
set fl to {alias "Mac HD:file 1", alias "Mac HD:file 2", alias "Mac
HD:file 3"}
set ls to {}
repeat with i from 1 to (count ls)
set theFile to item i of fl
set end of ls to {modification date of (basic info for theFile),
theFile}
end repeat
set ls to order list ls --sorts by mod date
set dl tp {}
repeat with j from 1 to (count ls)
set end of dl to item 2 of item j of ls
end repeat
dl
----
(or use 'creation date')
--
Paul Berkowitz