Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

MERGING two Scripts to Unmount disks except booting disk

How to merge this AppleScript:


------------------------

set volname to "MemoryFlashCard" -- # name of target volume

set p to (POSIX path of (volname & ":" as alias))'s text 1 thru -2

set sh to "diskutil umount " & quoted form of p & " &> /dev/null &"

do shell script sh

------------------------


that unmounts Memory Flash Cards like the

SanDisk Extreme 128 GB SDXC Class 10 UHS-1 Flash Memory Card 45MB/s SDSDX-128G-X46

http://www.amazon.com/SanDisk-Extreme-Class-Memory-SDSDX-128G-X46/dp/B00720TE1M


with this AppleScript that unmounts the internal Macintosh HD:


------------------------

set volname to "Macintosh HD" -- # name of target volume

set p to (POSIX path of (volname & ":" as alias))'s text 1 thru -2

set sh to "diskutil umount " & quoted form of p & " &> /dev/null &"

do shell script sh

------------------------


so that the MemoryFlashCard is unmounted FIRST, and then the Macintosh HD after rebooting or cold booting the Mac from an external disk?


Thanks.

Posted on Jun 14, 2013 3:47 AM

Reply
7 replies

There are no replies.

MERGING two Scripts to Unmount disks except booting disk

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.