Re: Sometime error -10006 copying a folder
Re: Sometime error -10006 copying a folder
- Subject: Re: Sometime error -10006 copying a folder
- From: Thomas Summerall <email@hidden>
- Date: Wed, 05 Mar 2008 18:40:27 -0500
I found a clue. If I have two installer images with the same name mounted then the installer fails with the -10006 error when it tries the Finder->duplicate command.
I'm using ((path to me) as string), so when I call the duplicate command I guess Finder doesn't like trying to decode the path when two volumes have the same name.
But I'm confused about how the users could be getting this, because I can't seem to get the same image to mount twice, so this may just be a coincidence.
Also, "Finder" is capitalized in my code.
Thomas Summerall
At 06:02 PM 3/5/2008, Philip Aker wrote:
>On 08-03-05, at 12:11, Thomas Summerall wrote:
>
>>That's what I get for typing in the code snippet instead of copy/ paste. The actual code does put "finder" in quotes.
>
>>I'm not sure what you mean by aliases.
>
>Mark Reed has supplied the intent of 'aliases'.
>
>I've been working on a case sensitive system as of this morning and
>been caught by a few case errors that I never would have noticed
>before. So I think your code should read "Finder".
>
>
>>>>I have written our Photoshop plug-in's installer in AppleScript.
>>>>Generally it works great. The installation is very simple, I
>>>>simply tell the finder to duplicate our product folder from inside
>>>>the installer apps package to Photoshop's plug-ins folder, which
>>>>has been chosen by the user using folder select.
>>>>
>>>>Some users (a small percentage) have been reporting a -10006 error
>>>>in this form:
>>>>
>>>>-- Finder got an error: Cant set folder "OSX:Applications:Adobe
>>>>Photoshop CS3:Plug-Ins" to folder "Installer
>>>>Disk:Installer.app:Contents:Product Folder". (-10006)
>>>>
>>>>The code in applescript is pretty straightforward:
>>>>
>>>>tell application finder
>>>> duplicate (folder (myPath as string)) to (folder (destPath as
>>>>string))
>>>>end tell
>>>>
>>>>I can't duplicate the error on any machine here. At first I
>>>>thought it might be a permissions issue, but when I try to create
>>>>that situation I get a different, permissions-specific error.
>>>>
>>>>The source folder is on a non-writable compressed disk image.
>>>>
>>>>Any ideas?
>>>
>>>You're not addressing the Finder correctly. It should be:
>>>
>>>tell application "Finder"
>>>
>>>I suggest to use a 'try' block in the script and use aliases for
>>>both the source and destination file system objects.
>>>
>>>You might want to try using 'ditto' in a 'do shell script' call as
>>>a means of getting a different error readout.
>
>
>Philip Aker
>echo email@hidden@nl | tr a-z@. p-za-o.@
>
>
>
_______________________________________________
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