That didn't seem to help...I am still getting the inconsistent results. It works for two or three times and then won't work for 3 or 4 times. The work and not work is the most annoying part!
I didn't think to mention that this is on a shared volume and not the local disk, not sure if that makes a difference. Also, I din't mention my particulars: most of us are on X.6.6 or X.6.7.
I have put the current script below with the event log. Not sure if it helps, but when it is successful, the "document file" includes the whole path in the line and not just the file name.
Any other suggestion appreciated.
John
Current script and Events:
set artPath to "Artwork:Library:FileMaker Downloaded Photos:Artwork:March 25 2011:"
set pictToDupe to "54074.psd" as string
set pictDuped to "64184.psd"
tell application "Finder"
activate
set temppictDuped to (duplicate item (artPath & pictToDupe))
set the name of temppictDuped to pictDuped
end tell
tell application "Finder"
activate
duplicate item "Artwork:Library:FileMaker Downloaded Photos:Artwork:March 25 2011:54074.psd"
--> document file "54074 copy.psd"
--> error number 0
set name of document file "54074 copy.psd" to "64184.psd"
--> error number -1728 from document file "54074 copy.psd"
Result:
error "Finder got an error: Can’t set document file \"54074 copy.psd\" to \"64184.psd\"." number -10006 from document file "54074 copy.psd"