Re: Renaming a copied file with Finder
Re: Renaming a copied file with Finder
- Subject: Re: Renaming a copied file with Finder
- From: Paul Berkowitz <email@hidden>
- Date: Mon, 09 Oct 2006 10:14:03 -0700
- Thread-topic: Renaming a copied file with Finder
On 10/9/06 9:59 AM, "Timothy Bates" <email@hidden> wrote:
> I was confident that Finder scripting was not remotely this smart, and I
> still think it is not:
>
> This script:
>
> tell application "Finder"
> duplicate file "Prelude:Users:tim:Desktop:imageR1D.png" to file
> "Prelude:Users:tim:Desktop:" without replacing
> end tell
>
> Gives this result:
>
> tell application "Finder"
> copy file "Prelude:Users:tim:Desktop:imageR1D.png" to file
> "Prelude:Users:tim:Desktop:"
> "Finder got an error: Can't set file \"Prelude:Users:tim:Desktop:\"
> to file \"Prelude:Users:tim:Desktop:imageR1D.png\"."
>
>
> Oops. Duplicate is executed as copy and fails
For one thing, "Prelude:Users:tim:Desktop:" is not a file, it's a folder. So
referring to file "Prelude:Users:tim:Desktop:" is always going to error. If
you change it to 'alias' or 'folder' I think you'll get the more sensible
error that Michelle quotes.
--
Paul Berkowitz
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden