• 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: Getting files/folders by creation date in the Finder
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting files/folders by creation date in the Finder


  • Subject: Re: Getting files/folders by creation date in the Finder
  • From: Deivy Marck Petrescu <email@hidden>
  • Date: Sat, 20 Jun 2009 22:11:11 -0400


On Jun 20, 2009, at 14:42, Christopher Stone wrote:

Hey Folks,

I know I can do something like this:

property f : alias "MyHardDrive:Users:xxxxx:Downloads:"

tell application "Finder"
set filelist to sort (get folders in f) by creation date
end tell

Unfortunately on my old G4 PowerBook it's rather slow, and I'm looking for a nearly instant solution.

I've tried using 'ls' in a shell script

property f : "/Users/xxxxx/Downloads/New Downloads/"

do shell script "ls -1tr " & quoted form of f

This is way faster than the Finder, *but* strangely it only supports 'modification date' and not 'creation date'.  The mod date is likely to change on me, so it's really desirable to use the creation date.

Any ideas?

Thanks.

Chris
_______________________________________________


Chris,

Trying with many variations, the one below was about half the others.

tell application "Finder" to set filelist to sort (get folders in (path to "down") as alias list) by creation date

It is a one line script.
It  is also portable. 
That is you do not use an user's Mac specific path.


Deivy Petrescu
email@hidden





 _______________________________________________
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: 
 >Getting files/folders by creation date in the Finder (From: Christopher Stone <email@hidden>)

  • Prev by Date: Re: FileMaker Create Record Target
  • Next by Date: Re: Strange InDesign script misbehavior
  • Previous by thread: Re: Getting files/folders by creation date in the Finder
  • Next by thread: Re: FileMaker Create Record Target
  • Index(es):
    • Date
    • Thread