ANN: New USB Drive Library

Ken Ray kray at sonsothunder.com
Mon Jun 25 21:41:45 EDT 2007


On Mon, 25 Jun 2007 14:54:41 -0700, Phil Davis wrote:

> If I understand correctly, you're talking about the difference 
> between unmounting the drive and unplugging it. The ability to 
> unmount a drive would be nice. When I learn how to unmount a device 
> from the command line on Win & Mac, I'll add it to this library.
> 
> (If anyone already knows, feel free to jump in!)

For OS X, first do this:

  diskutil list

And then extract the list of disks (/dev/disk0, /dev/disk1, etc.). 
Then, for each disk, do:

  diskutil info <disk>

and then parse for "Protocol: USB" and "Ejectable: Yes". Then you have 
a list of mounted USB drives. Then to unmount a drive, execute:

  disutil unmountdisk <disk>

I'm not sure how to do it on Windows...

Ken Ray
Sons of Thunder Software, Inc.
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/



More information about the use-livecode mailing list