Re: EOF Error passing "quoted form of the POSIX path" to "do shell script"
Re: EOF Error passing "quoted form of the POSIX path" to "do shell script"
- Subject: Re: EOF Error passing "quoted form of the POSIX path" to "do shell script"
- From: "Mark J. Reed" <email@hidden>
- Date: Wed, 24 Oct 2007 08:25:28 -0400
You have an extra quotation mark before "ditto".
Also, you need to pass the two pathnames as separate arguments;
quoting them together will cause ditto to complain that it can't find
that file and abort.
Finally, I don't know why you're taking the POSIX path of a string
(does that even work?) when that string already contains the POSIX
path, which is just the /-separated version of the pathname (as
opposed to the traditional Mac OS :-separated version).
On 10/24/07, Jonathan Piccolo <email@hidden> wrote:
> I'm using the following piece of code in a script:
>
> do shell script "'ditto " & quoted form of the POSIX path of "~/
> Desktop/Archive/Library/Application Support/ /Library/Application
> Support/"
>
> and it's giving me the following error:
>
> AppleScript Error
> sh: -c: line 1: unexpected EOF while looking for matching `''
> sh: -c: line 2: syntax error: unexpected end of file
>
> after which it then it highlights the entire line shown above (I
> assume to tell me that it's the culprit).
>
> I've read and re-read the Apple Tech Note on how to deal with certain
> characters in pathnames (found here: <http://developer.apple.com/
> technotes/tn2002/tn2065.html#TNTAG4>) but to no avail. Anyone slay
> this dragon yet and care to share? Thanks!
>
> Regards,
>
> Jonathan Piccolo
> ---------------------------------------------------
> email@hidden
> http://www.callthemacwizard.com
>
>
>
--
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