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

Re: Date Sort


  • Subject: Re: Date Sort
  • From: has <email@hidden>
  • Date: Mon, 7 Feb 2005 13:15:47 +0000

David Langer wrote:

I'm not a programmer, but wonder if there's a simple script available that can sort the contents of a folder by date?

Depends on what you're working with and in what form you want the result. For example, to list filenames sorted by modification date using the shell:


	ls -t  /path/to/some/folder

Or if you're scripting the Finder, AppleMods' FinderExtras library <http://applemods.sourceforge.net> provides commands for sorting Finder references by name and date, e.g.:

--(library loading code omitted for clarity)

tell application "Finder" to set itemsRef to a reference to every item of folder "Documents" of home
set sortedRefs to _FinderExtras's sortByDateModified(itemsRef)


HTH

has
--
http://freespace.virgin.net/hamish.sanderson/
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: Getting popup menu item with System Events
  • Next by Date: Re: Getting popup menu item with System Events
  • Previous by thread: Date Sort
  • Next by thread: Re: Date Sort
  • Index(es):
    • Date
    • Thread