• 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 Problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Sort Problem


  • Subject: Re: Sort Problem
  • From: Christopher Stone <email@hidden>
  • Date: Sun, 23 Aug 2009 10:13:06 -0500

On Aug 22, 2009, at 16:16, Luther Fuller wrote:

It works perfectly. Realizing that I really didn't need the whose phrase because the files in the folder are always pdf files, I change the line above to ...

set fileList to sort (files of someFolder) by modification date

Now, I always get the error ...
______________________________________________________________________

Hey Luther,

This works for me:

tell application "Finder"
set filelist to reverse of (sort (get items in (path to "down") as alias list) by modification date)
end tell

I find it a trifle slow on my G4 PowerBook (especially when there are many items), so I use a shell script instead:

property srcFolder : path to "down"
set p to POSIX path of srcFolder
set fList to do shell script "ls -t " & quoted form of p
set fList to reverse of paragraphs of fList

Chris
 _______________________________________________
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

References: 
 >Sort Problem (From: Luther Fuller <email@hidden>)

  • Prev by Date: Re: sort
  • Next by Date: Re: [Plug] MacScripter.net is ten years old
  • Previous by thread: Re: Sort Problem
  • Next by thread: [Plug] MacScripter.net is ten years old
  • Index(es):
    • Date
    • Thread