• 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: Copy file across volumes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Copy file across volumes


  • Subject: Re: Copy file across volumes
  • From: "Gary (Lists)" <email@hidden>
  • Date: Thu, 28 Jul 2005 11:25:41 -0400

"Simon Forster" wrote:

> If I get the Finder to copy the files, occasionally I've received a
> "Finder is busy" message. I suppose I could trap for this error but
> then how?

>From least specific to most...

To "trap" for an error, you use a 'try...on error...end try' block of code.

try
    tell app "Finder" to -- do some stuff
on error errMsg_ number errNum_
    return {errNum_, errMsg_}
    -- or whatever else
end try


Okay, that's that.  But, in your case, when you are copying a file, what you
probably want to do is to wait until the file is finished before moving on.

To do that, you don't need the Finder.  Use the 'busy status' property of
the file information record you get from the 'info for' command.

tell app "Finder" -- to do some copying with 'f'
...
repeat until busy status of (get info for f) is false
    -- wait, twiddle thumbs
end repeat

OR

repeat while busy status of (get info for f) is true
    -- wait, twiddle thumbs
end repeat

Both of those repeat formats work for me, X.3.9.  That may work for your
application as well.
--
Gary

 _______________________________________________
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: Copy file across volumes
      • From: Shane Stanley <email@hidden>
    • Re: Copy file across volumes
      • From: Emmanuel <email@hidden>
    • Re: Copy file across volumes
      • From: Simon Forster <email@hidden>
References: 
 >Copy file across volumes (From: Simon Forster <email@hidden>)

  • Prev by Date: re: tiger problem with keychain scripting
  • Next by Date: Re: shallow vs deep copying [was Re: Applescript-users Digest, Vol 2, Issue 492]
  • Previous by thread: Copy file across volumes
  • Next by thread: Re: Copy file across volumes
  • Index(es):
    • Date
    • Thread