Why do I get an error whenever I try to tell the Finder to duplicate a folder that is a package? The following script snippet works flawlessly:
tell application "Finder"
duplicate folder ¬
"Alice:Users:chuck:Documents:TestFolder" to folder ¬
"Alice:Users:chuck"
end tell
But, if I rename TestFolder to TestFolder.key (adding the extension for Keynote packages) and alter the script appropriately, I get an error -10006, "Finder got an error: Can’t set folder “Alice:Users:chuck” to folder “Alice:Users:chuck:Documents:TestFolder.key”.
Using an extention that doesn’t indicate that the folder is a package (such as “.dir”) also works fine.
Am I going to have to use a do script and have it use the cp command?
Thanks,
Chuck