Naming a duplicated file
Naming a duplicated file
- Subject: Naming a duplicated file
- From: John Haley <email@hidden>
- Date: Thu, 24 Mar 2011 18:15:20 -0500
I have been tinkering with this all afternoon and finally give up. I want to duplicate a file and change its name. I think I am doing this the right way, not sure if there is a better way or not. Anyway, it worls some tiem and not other tiems. After aallot of playing around, ithink it is when the file is bigger it doesn't work. Here is my script with the events below for when it errors out.
Any help appreticciated,
John
set artPath to "Artwork:Library:FileMaker Downloaded Photos:Artwork:March 24 2011:" set pictToDupe to artPath & "53996.psd" set pictDuped to "64180.psd" tell application "Finder" set temppictDuped to (duplicate item pictToDupe to artPath) delay 10 --(I added just in case, doesn*t seem to help) set the name of temppictDuped to pictDuped end tell
tell application "Finder" -- 'core'\'clon'{ 'insh':'utxt'("Artwork:Library:FileMaker Downloaded Photos:Artwork:March 24 2011:"), '----':'obj '{ 'form':'name', 'want':'cobj', 'seld':'utxt'("Artwork:Library:FileMaker Downloaded Photos:Artwork:March 24 2011:53996.psd"), 'from':'null'() }, &'csig':65536 } --> document file "53996 6.psd" --> error number 0 set name of document file "53996 6.psd" to "64180.psd" --> error number -1728 from document file "53996 6.psd" Result: error "Finder got an error: Can’t set document file \"53996 6.psd\" to \"64180.psd\"." number -10006 from document file "53996 6.psd" |
_______________________________________________
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