How to tell if a file is busy?
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.