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: "leo" <email@hidden>
- Date: Tue, 16 Mar 2004 17:40:52 +1100
i got the same experience with diskutil as you: do shellscript behaves
differentlly to the same command in terminal. %-(((
leo
----- Original Message -----
From: "Graff" <email@hidden>
To: "Applescript-Users List" <email@hidden>
Sent: Tuesday, March 16, 2004 4:03 PM
Subject: Re: how to eject a firewire drive natively
>
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.
_______________________________________________
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.