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

Re: last opened


  • Subject: Re: last opened
  • From: Vince Angeloni <email@hidden>
  • Date: Thu, 22 Mar 2007 15:31:48 -0500

You can also use 'do shell' using Ruby to get the date and time a file was last accessed. You have Ruby if you have OS X 10.4 or higher.
Just test this in terminal: 

ruby -e 'puts File.stat("/path/to/your/file.txt").atime'

You need to escape the quotes in Applescript for this to work:

set tscript to "ruby -e 'puts File.stat(\"/Users/vangelon/Desktop/Untitled.sc45\").atime'"
do shell script tscript

HTH

Vince
 _______________________________________________
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: last opened
      • From: "Mark J. Reed" <email@hidden>
  • Prev by Date: RE: iTunes, NSAppleScript, and timeout
  • Next by Date: Re: last opened
  • Previous by thread: Re: last opened
  • Next by thread: Re: last opened
  • Index(es):
    • Date
    • Thread