• 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
Re: Sort folder list descending
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Sort folder list descending


  • Subject: Re: Sort folder list descending
  • From: Alex Zavatone <email@hidden>
  • Date: Thu, 25 Mar 2010 16:28:17 -0500


On Mar 25, 2010, at 4:20 PM, Luther Fuller wrote:

On Mar 25, 2010, at 4:10 PM, Alex Zavatone wrote:

Ok, it looks like this is most of the way there.  Do you have a good way to get the text name of the folder out of the resulting list while keeping the sort order?

How do I simply get the folder name of these folders as 

On Mar 25, 2010, at 3:33 PM, Luther Fuller wrote:

get sort (get folders of sourceFolder) by modification date
set folderList to (reverse of the result) as alias list

Perhaps this does what you are looking for ...

set sourceFolder to alias "OS_X:Library:Frameworks" -- for example
tell application "Finder"
get sort (get folders of sourceFolder) by modification date
set folderList to (reverse of the result) as alias list
--
repeat with i from 1 to (count items of folderList)
(name of item i of folderList) as text
display dialog the result
end repeat
end tell
beep

Or not?

Yep.  That does.  I saw that I could get the name of an individual item of the list but for some reason you can not get the name of every item or each item in the list.  I was hoping there was one of those elegant AppleScript one liners that lets you do a loop in one line.

Sometimes, it's pretty impossible to know when AppleScript will let you do do something and when it won't.

Thanks Luther.  You saved me serious pain here.

Cheers, 
- Alex
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: Sort folder list descending
      • From: Luther Fuller <email@hidden>
    • Re: Sort folder list descending
      • From: "Mark J. Reed" <email@hidden>
References: 
 >Sort folder list descending (From: Alex Zavatone <email@hidden>)
 >Re: Sort folder list descending (From: Luther Fuller <email@hidden>)
 >Re: Sort folder list descending (From: Alex Zavatone <email@hidden>)
 >Re: Sort folder list descending (From: Luther Fuller <email@hidden>)

  • Prev by Date: Re: coerce record to string - does this work in other System languages?
  • Next by Date: Re: Get all files in a folder ignoring invisibles?
  • Previous by thread: Re: Sort folder list descending
  • Next by thread: Re: Sort folder list descending
  • Index(es):
    • Date
    • Thread