• 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: Best way to tell if a file copy has finished.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Best way to tell if a file copy has finished.


  • Subject: Re: Best way to tell if a file copy has finished.
  • From: Christopher Nebel <email@hidden>
  • Date: Tue, 16 Aug 2005 11:02:49 -0700

On Aug 15, 2005, at 7:49 PM, Jeff Porten wrote:

On Aug 2, 2005, at 7:58 AM, email@hidden wrote:

I have a script that must process files that appear in a folder, they are copied there from another mac across the network. I've seen a couple of methods for this in scripts I've found on the web. I did have one method that seemed to work well under Panther but it doesn't work under Tiger....

Under Tiger I have found that the file size remains at zero until the file has finished copying, so my script now loops while the file size is zero.

If I'm understanding the question right, you want your script to wait until a copy has completed before going on to something else. That's the default, so just use a Finder copy and tell AppleScript to wait patiently for it to finish...

That would work *if* you were the one that originated the copy operation, but that isn't the case here -- the file is effectively being pushed at you from across the network.


There unfortunately isn't really any good way to detect this; the usual strategy is something along the lines of what you're doing, namely polling the file size. Testing the "busy status" property (see System Events) *may* work, depending on the copy protocol being used.


--Chris Nebel AppleScript and Automator Engineering

_______________________________________________
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: Best way to tell if a file copy has finished.
      • From: Jeff Porten <email@hidden>
References: 
 >Best way to tell if a file copy has finished. (From: email@hidden)
 >Re: Best way to tell if a file copy has finished. (From: Jeff Porten <email@hidden>)

  • Prev by Date: Re: QuarkXPress Duping Objects
  • Next by Date: Re: QuarkXPress Duping Objects
  • Previous by thread: Re: Best way to tell if a file copy has finished.
  • Next by thread: Re: Best way to tell if a file copy has finished.
  • Index(es):
    • Date
    • Thread