• 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: Why is copying a file so hard?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why is copying a file so hard?


  • Subject: Re: Why is copying a file so hard?
  • From: Paul Berkowitz <email@hidden>
  • Date: Fri, 17 Jun 2005 16:39:24 -0700
  • Thread-topic: Why is copying a file so hard?

On 6/17/05 4:18 PM, "email@hidden" <email@hidden> wrote:

> I open the Dictionary for Finder.app and
> find there isn't a copy command - it isn't available yet says the
> note (for goodness sake this is OS X 10.4.1 the fifth version of OS X
> and we can't copy to the clipboard using Applescript!), but there is
> a duplicate command.
> so I try
> duplicate "/Volumes/1GIG/ SPELEAN/ Spelean data" to "/Volumes/Lt
> Data/v3.9 DF/ Spelean data.AP" replacing Yes
> This time I get 'An identifier can't go after this """ '.
> Yet the syntax in the dictionary says I can have "Replacing boolean"
> as part of the command.  AAAArrrgghh.
>
> This is a simple task and it should be simple in Applescript but it
> isn't and the syntax checking is perhaps accurate, but ultimately
> unhelpful.
>
> And why is the Finder still not fully recordable?
> and finally can anyone suggest a line which will work?

You don't actually seem to have followed the _replies_ to Sparky.

About five of us have already explained that you can't feed the Finder
POSIX-type text file paths. (Actually this is true of just about every
command in standard AppleScript.) It takes Finder objects (files and folders
using contorted syntax) but will accept alias references which are a lot
simpler. Several of the replies showed how to convert POSIX paths into
aliases:

    set foo to "/Volumes/1GIG/ SPELEAN/ Spelean data"
    set foo to POSIX file foo as alias

Do the same with your destination path, then do the duplication command in
the Finder using the correct alias objects.

And please go back and  read the many replies to Sparky.

(Why would you want to copy a file to the clipboard anyway? You actually can
using 'set the clipboard' from Standard Additions, by the way. Again you'd
need alias references, not strings.)

--
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: Why is copying a file so hard? part 3
      • From: email@hidden
References: 
 >Why is copying a file so hard? (From: email@hidden)

  • Prev by Date: Re: One for the experts: Serial Number of computer using Applescript Studio
  • Next by Date: Re: Why is copying a file so hard?
  • Previous by thread: Why is copying a file so hard?
  • Next by thread: Re: Why is copying a file so hard? part 3
  • Index(es):
    • Date
    • Thread