• 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: "Mark J. Reed" <email@hidden>
  • Date: Thu, 22 Mar 2007 04:41:52 -0400

Is the LastUsedDate in some way distinct from the UNIX atime? (which
you can get with ls -u)...

On 3/22/07, Takaaki Naganoya <email@hidden> wrote:
How about "mdls" command on BSD layer?
"mdls" tells you the last used date.

<AppleScript>
set aFile to choose file
set aPOSIXpath to quoted form of POSIX path of aFile
set shellText to "mdls -name " & (ASCII character 34) &
"kMDItemLastUsedDate" & (ASCII character 34) & " " & aPOSIXpath
do shell script shellText
</AppleScript>

--> "/Users/maro/Documents/1307643.rtf -------------
kMDItemLastUsedDate = 2007-03-22 16:24:00 +0900"

And just cook the date text.

--
Takaaki Naganoya
Piyomaru Software
http://piyo.piyocast.com
email@hidden

On 2007/03/19, at 20:20, Wayne Melrose wrote:

> In the Finder "get properties", it shows the "last modification date".
>
> Is there a way to find the "last opened" date? (The same way that
> you can searching in Finder.)
>
> thanks in advance.
>
> Wayne
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> AppleScript-Users mailing list      (applescript-
> email@hidden)
> Help/Unsubscribe/Update your Subscription:
> mark.nu
> Archives: http://lists.apple.com/archives/applescript-users
>
> This email sent to 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



--
Mark J. Reed <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
  • Follow-Ups:
    • Re: last opened
      • From: Takaaki Naganoya <email@hidden>
References: 
 >last opened (From: Wayne Melrose <email@hidden>)
 >Re: last opened (From: Takaaki Naganoya <email@hidden>)

  • Prev by Date: Re: last opened
  • Next by Date: Scripting RagTime
  • Previous by thread: Re: last opened
  • Next by thread: Re: last opened
  • Index(es):
    • Date
    • Thread