Re: Naming a duplicated file
Re: Naming a duplicated file
- Subject: Re: Naming a duplicated file
- From: KOENIG Yvan <email@hidden>
- Date: Fri, 25 Mar 2011 08:50:20 +0100
Le 25 mars 2011 à 00:15, John Haley a écrit : 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
(1)There is no file pictToDupe. There may be exist a file ( artPath & pictToDupe) (2) Finder can't create a duplicate in a string but it may do in a folder So, it would be better to code :
set temppictDuped to (duplicate item (artPath & pictToDupe) )
Yvan KOENIG (VALLAURIS, France) vendredi 25 mars 2011 08:50:15
|
_______________________________________________
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