• 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: Shane Stanley <email@hidden>
  • Date: Fri, 06 Jul 2001 08:22:50 +1000

On 6/7/01 4:01 AM +1000, Tom Neuhold-Huber, email@hidden,
wrote:

> I am trying to copy multiple files in OS 9.1, storing the list of files in a
> variable. But haven't figured out how to format the list. I have tried the
> following:
>
>
> 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."
>
> 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
>
> But then I get an error on the set statement "Can't make some data into the
> expected type."
>
> So how do I format the list so it works with this?

You need to use something the Finder understands, like aliases:

set myfiles to {alias "mydisk:myfolder:myfile1", alias
"mydisk:myfolder:myfile1"}

Then there's no need to select them -- it only wastes time. And the command
you want is not copy but move:

tell application "Finder"
move myfiles to folder "mydisk:myotherfolder"
end tell

--
Shane Stanley, email@hidden


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