There are ways to get volume name via scripting, instead of user input, here is a script than can be named "unmount" for example...
Code:
.key DEV/A
.bra [
.ket ]
set fromdir "`cd`"
cd [DEV]
set VOL "`cd`"
cd "$fromdir"
assign [DEV] dismount
assign "$VOL" dismount
The dirty trick is that it enters into the device to get volume name using the cd command - there are times when entering the device is undesired (stale network drive f.eks). C:Info could do well with an update and LFORMAT option... something for the wish list
Anyways, here is a program you may be interested in
http://aminet.net/package/disk/misc/Dismount