Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: last opened



Mark, I comfirmed they return same date. So, your way is smarter and faster than mine.
Thank you!

<Terminal>
maroMacBook:~/Desktop maro$ ls -la | grep top
drwxrwxr-x    80 maro  maro      2720 Jun 19  2006 From Desktop
drwxrwxr-x   229 maro  maro      7786 Feb 10 10:53 From Desktop2
-rw-r--r--     1 maro  maro     41860 Mar  8 14:56 top083.jpg

maroMacBook:~/Desktop maro$ ls -lau | grep top
drwxrwxr-x    80 maro  maro      2720 Feb 24 10:40 From Desktop
drwxrwxr-x   229 maro  maro      7786 Feb 24 10:40 From Desktop2
-rw-r--r--     1 maro  maro     41860 Mar 22 11:23 top083.jpg

maroMacBook:~/Desktop maro$ mdls /Users/maro/Desktop/top083.jpg
/Users/maro/Desktop/top083.jpg -------------

(*  Snip!!  *) 

kMDItemLastUsedDate            = 2007-03-22 11:23:46 +0900
kMDItemPixelHeight             = 300
kMDItemPixelWidth              = 593
kMDItemResolutionHeightDPI     = 72
kMDItemResolutionWidthDPI      = 72
kMDItemUsedDates               = (2007-03-08 14:56:01 +0900, 2007-03-22 09:00:00 +0900)
</Terminal>

--
Takaaki Naganoya
Piyomaru Software

On 2007/03/22, at 17:41, Mark J. Reed wrote:

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

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-
> Help/Unsubscribe/Update your Subscription:
> mark.nu
>
> 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:

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:
http://lists.apple.com/mailman/options/applescript-users/email@hidden
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

References: 
 >last opened (From: Wayne Melrose <email@hidden>)
 >Re: last opened (From: Takaaki Naganoya <email@hidden>)
 >Re: last opened (From: "Mark J. Reed" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.