• 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: how to eject a firewire drive natively
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to eject a firewire drive natively


  • Subject: Re: how to eject a firewire drive natively
  • From: Graff <email@hidden>
  • Date: Thu, 18 Mar 2004 13:59:03 -0500

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.


References: 
 >how to eject a firewire drive natively (From: "leo" <email@hidden>)
 >Re: how to eject a firewire drive natively (From: Graff <email@hidden>)

  • Prev by Date: Re: osascript and Modification Date of Compiled Script
  • Next by Date: Template for Debugging "on Open..." Handler
  • Previous by thread: Re: how to eject a firewire drive natively
  • Next by thread: Re: how to eject a firewire drive natively
  • Index(es):
    • Date
    • Thread