Re: Message -ID, email@hidden, Back and forth between Posix and HFS paths
Re: Message -ID, email@hidden, Back and forth between Posix and HFS paths
- Subject: Re: Message -ID, email@hidden, Back and forth between Posix and HFS paths
- From: "Mark J. Reed" <email@hidden>
- Date: Mon, 29 Mar 2010 21:19:32 -0400
I just pasted the script from your message into AppleScript Editor and
it compiled and ran fine after I removed the ">" marks and newlines.
So it's something on your end, possibly the same thing that added the
extra "\n"'s in your earlier message. Note that the entire "do shell
script" command is one single line.
Here's the entire script I used to test (3 lines total):
set myFolder to choose folder
do shell script "perl -MFile::Find -le 'find(sub { return if -d || $_
eq \".DS_Store\"; $mtime = (lstat $_)[9]; $newest =
[$File::Find::name, $mtime] if (!$newest || $mtime > $newest->[1]); },
shift); print $newest->[0]' " & (quoted form of POSIX path of
myFolder)
POSIX file result
On Mon, Mar 29, 2010 at 8:18 PM, Cosgrave Valentine <email@hidden> wrote:
> Mark,
>
> The previous script appears to work. Really does. And I am thrilled.
>
> if i find that it gives incorrect results I'll post it on the thread.
>
> The last script (below) without the n, throws up the following error.
>
> "String found where operator expected at -e line 1, near "$_eq ".DS_Store""
> (Missing operator before ".DS_Store"?)
> syntax error at -e line 1, near "$_eq ".DS_Store""
> Execution of -e aborted due to compilation errors."
>
> I'm going offline now. In Ireland.
>
> and Thanks again
>
> Val
>
>
> On 30 Mar 2010, at 00:58, Mark J. Reed wrote:
>
> Something added some spurious "\n"s to the perl code. It should just be this:
>
>> do shell script "perl -MFile::Find -le 'find(sub { return if -d || $_
>> eq \".DS_Store\"; $mtime = (lstat $_)[9]; $newest =
>> [$File::Find::name, $mtime] if (!$newest || $mtime > $newest->[1]); },
>> shift); print $newest->[0]' " & (quoted form of POSIX path of
>> myFolder)
>
>
--
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: | |
| >Message -ID, email@hidden, Back and forth between Posix and HFS paths (From: Cosgrave Valentine <email@hidden>) |
| >Re: Message -ID, email@hidden, Back and forth between Posix and HFS paths (From: Alex Zavatone <email@hidden>) |
| >Re: Message -ID, email@hidden, Back and forth between Posix and HFS paths (From: "Mark J. Reed" <email@hidden>) |
| >Re: Message -ID, email@hidden, Back and forth between Posix and HFS paths (From: Cosgrave Valentine <email@hidden>) |
| >Re: Message -ID, email@hidden, Back and forth between Posix and HFS paths (From: "Mark J. Reed" <email@hidden>) |
| >Re: Message -ID, email@hidden, Back and forth between Posix and HFS paths (From: Cosgrave Valentine <email@hidden>) |