• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Renaming a copied file with Finder
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Renaming a copied file with Finder
      • From: Timothy Bates <email@hidden>
References: 
 >Re: Renaming a copied file with Finder (From: Timothy Bates <email@hidden>)

  • Prev by Date: Re: Renaming a copied file with Finder
  • Next by Date: Re: Renaming a copied file with Finder
  • Previous by thread: Re: Renaming a copied file with Finder
  • Next by thread: Re: Renaming a copied file with Finder
  • Index(es):
    • Date
    • Thread