Re: how to eject a firewire drive natively
Re: how to eject a firewire drive natively
- Subject: Re: how to eject a firewire drive natively
- From: Graff <email@hidden>
- Date: Sat, 20 Mar 2004 21:33:13 -0500
I also found out that you can use drutil to open, close, and eject a
disk burning drive:
do shell script "drutil tray eject"
This works with drives that can burn CDs or DVDs, I'm not sure if it
will work with CD-ROM only drives.
There is also disktool which can eject a disk provided you have its
/dev antry:
do shell script "disktool -e disk1s1s2"
Both of these commands work from AppleScript, although disktool takes a
while to do its work.
Still, I'd love to know why diskutil works on the command line but not
from AppleScript.
-Ken
On Mar 20, 2004, at 9:15 PM, email@hidden wrote:
i did more trials:
diskutil doesn't work so fare, but hdiutil does!!!
unfortunatly hdiutil needs the volume as "/dev/"-device, so you have
to find it with mount or so.
two "do shell script"s... seems pretty messy to me, but its the only
path i can see...
cheers, leo
On 19/03/2004, at 5:59 AM, Graff wrote:
I see that no one had any comments on this topic so I thought maybe
I'd touch on it again in case it was overlooked. Does anyone have
any idea what is going wrong with this? For some reason I have a "do
shell script" command that is only half working and I can't see any
reason why.
-Ken
On Mar 16, 2004, at 12:03 AM, Graff wrote:
You could always use the command-line tool diskutil:
-----------
set posixPath to quoted form of ("/Volumes/" & diskName)
do shell script "diskutil eject " & posixPath
-----------
Ok, oddly enough I just tried this and I'm having problems with it.
I used this script:
-----------
set diskName to "Jedi Academy Disc 1"
-- Jedi Academy Disc 1 is a CD-ROM disk
set posixPath to quoted form of ("/Volumes/" & diskName)
do shell script "diskutil eject " & posixPath
-----------
This ends up producing the command:
diskutil eject '/Volumes/Jedi Academy Disc 1'
Which produces this result in AppleScript:
""
The disk gets removed from the desktop and the entry for it in
/Volumes is also removed, however the disk does not get ejected and
the /dev entry for the disk is still there.
When I do the command directly in the shell the disk is removed from
the desktop, from /Volumes, the /dev entry is removed, and the disk
gets ejected from the drive. This is the result from the command:
Disk /Volumes/Jedi Academy Disc 1 ejected
Can anyone shed some light on this? I can't figure out why a shell
command executed from AppleScript would do this. I even ran the
command in a sh shell session to see if there was some sort of
difference there. It ran exactly the same under sh as it did in
tcsh.
-Ken
On Mar 15, 2004, at 7:57 PM, leo wrote:
want to eject a firewrire drive (iPod) in applescript via
applescript.
however, i don't want to use the finder function "eject" due to
finder's
non-interceptable message dialogs when the firewire drive is in use.
any idea how i can eject a drive natively or via another more
controllable
method?
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.