• 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
How to tell if a file is busy?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to tell if a file is busy?


  • Subject: How to tell if a file is busy?
  • From: email@hidden
  • Date: Tue, 25 Sep 2001 10:36:24 +1000

It's little things like this that drive me bonkers trying to use AppleScript.

I'm using OS 9
I want to check if a file on a mounted volume from an ASIP server is in use before trying to copy it.
This is based on a sample script from Sal Soghoian, Apple Computer
This code returns Busy: false when I know the file is in use. Why is it so?

tell application "Finder"
activate
with timeout of 300 seconds
set item_info to info for file "Fred"
set item_name to name of item_info
set item_busy to busy status of item_info
with timeout of 900 seconds
set dialogText to item_name & return & return
set dialogText to dialogText & "Busy: " & item_busy & return
display dialog dialogText
end timeout
end timeout

end tell

Cheers, Andrew Pavey


Spelean is the exclusive Australian and New Zealand Distributor
for many fine camping, climbing, caving and rescue products

Web pages: http://www.spelean.com.au email: email@hidden

Phone: (+61) 2 9966 9800, Fax: (+61) 2 9966 9811
PO Box 645, ARTARMON, NSW, 1570, Australia.


  • Follow-Ups:
    • Re: How to tell if a file is busy?
      • From: Jon Pugh <email@hidden>
  • Prev by Date: RE: AS adoption barriers
  • Next by Date: Check if Key is down?
  • Previous by thread: Show/Hide a Package in OS9x
  • Next by thread: Re: How to tell if a file is busy?
  • Index(es):
    • Date
    • Thread