• 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: Takaaki Naganoya <email@hidden>
  • Date: Fri, 23 Mar 2007 13:24:05 +0900

Hmm...I found the fault.

<AppleScript>
set myFile to choose file
do shell script "perl -MFile::stat -MPOSIX -le 'print strftime(\"%FT%T \", localtime(stat(" & (ASCII character 34) & POSIX path of myFile & (ASCII character 34) & ")->atime))'"
</AppleScript>


--> "2007-03-23T09:51:55"

# Wayne, where are you?  :-)

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

On 2007/03/23, at 5:55, Mark J. Reed wrote:

Ah, sorry, quoted form of"" is producing single quotes instead of
double quotes.  So you need to replace the single quotes in the shell
commands with backslashed double quotes instead. This works OMM:

set myFile to (choose file)
do shell script "perl -MFile::stat -le \"print stat("& quoted form of
POSIX path of myFile & ")->atime\" "

On 3/22/07, Takaaki Naganoya <email@hidden> wrote:
Your sample does not work on my environment :-(

On 2007/03/23, at 0:38, Mark J. Reed wrote:

> do shell script "perl -MFile::stat -le 'print stat(" &
> quoted form of POSIX path of
> myFile & ")->atime)'"
> --> 1143044640


<AppleScript>
set myFile to choose file
do shell script "perl -MFile::stat -le 'print stat(" & quoted form of
POSIX path of myFile & ")->atime)'"
</AppleScript>

--> Bareword found where operator expected at -e line 1, near \"/
Users/maro\"
        (Missing operator before aro?)
syntax error at -e line 1, near \"/Users/maro\"
Execution of -e aborted due to compilation errors."


> do shell script "perl -MFile::stat -MPOSIX -le 'print strftime (\"%FT
> %T\",
> localtime(stat(" & quoted form of POSIX path of
> myFile & ")->atime))'
> --> "2006-03-22T11:24:00"


<AppleScript>
set myFile to choose file
do shell script "perl -MFile::stat -MPOSIX -le 'print strftime(\"% FT%T
\", localtime(stat(" & quoted form of POSIX path of myFile & ")-
>atime))'"
</AppleScript>


--> "Bareword found where operator expected at -e line 1, near \"/
Users/maro\"
        (Missing operator before aro?)
syntax error at -e line 1, near \"/Users/maro\"
Execution of -e aborted due to compilation errors."

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

_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (applescript- email@hidden)
Help/Unsubscribe/Update your Subscription:
40mail.com
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
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>)
 >Re: last opened (From: Takaaki Naganoya <email@hidden>)
 >Re: last opened (From: "Mark J. Reed" <email@hidden>)
 >Re: last opened (From: Takaaki Naganoya <email@hidden>)
 >Re: last opened (From: "Mark J. Reed" <email@hidden>)

  • Prev by Date: Re: Scripting RagTime
  • Next by Date: Re: FM 8 layout references w/applescript - works in one file, fails in five other identical files!
  • Previous by thread: Re: last opened
  • Next by thread: Re: last opened
  • Index(es):
    • Date
    • Thread