• 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: copying multiple files in 9.1 and OSX
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: copying multiple files in 9.1 and OSX


  • Subject: Re: copying multiple files in 9.1 and OSX
  • From: Michelle Steiner <email@hidden>
  • Date: Thu, 5 Jul 2001 15:45:20 -0700

On 7/5/01 11:01 AM, Tom Neuhold-Huber <email@hidden>
wrote:

>set myfiles to {"mydisk:myfolder:myfile1", "mydisk:myfolder:myfile1"}
>tell application "Finder"
> select myfiles
> copy selection to folder "mydisk:myotherfolder"
>end tell
>
>But I get an Execution error on the select statement "Finder got and error.
>Invalid key form."

Because you didn't define them as files, but as strings.

>I have also tried:
>
>set myfiles to {file "mydisk:myfolder:myfile1", file
>"mydisk:myfolder:myfile1"}
>tell application "Finder"
> select myfiles
> copy selection to folder "mydisk:myotherfolder"
>end tell

You need to have the first set inside the tell statement. Secondly, Copy
puts things on the clipboard; you need to use Duplicate. Here's a
working script, using my hard disk's name and actual files on the disk:

tell application "Finder"
set myfiles to {file "dora:set x", file "dora:Picture 1"}
duplicate myfiles to folder "dora:myotherfolder"
end tell

or, in one line:

tell application "Finder" to duplicate {file "dora:set x", file
"dora:Picture 1"} to folder "dora:myotherfolder"

--Michelle

----------------------------------------------------------------------
| Michelle Steiner | We're not human beings having a spiritual |
| | experience. We're spiritual beings |
| email@hidden | having a human experience. |
----------------------------------------------------------------------


  • Prev by Date: Re: copying multiple files in 9.1 and OSX
  • Next by Date: Re: copying multiple files in 9.1 and OSX
  • Previous by thread: Re: copying multiple files in 9.1 and OSX
  • Next by thread: Re: copying multiple files in 9.1 and OSX
  • Index(es):
    • Date
    • Thread