• 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: Tue, 16 Mar 2004 00:03:03 -0500

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.


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

  • Prev by Date: Re: applescript to get system version
  • Next by Date: Re: finding newest file in a folder
  • Previous by thread: how to eject a firewire drive natively
  • Next by thread: Re: how to eject a firewire drive natively
  • Index(es):
    • Date
    • Thread