As you have noticed, the volume name displayed by OS X changes with every DVD you insert, which makes symlinking to it moot. However, at the lower level of BSD devices, the DVD drive has a handle independent of volume names – its filename in the /dev
pseudo-filesystem, where you will find all your drives as /dev/disk#
(for the root disk level) and /dev/disk#s#
(for the disk partition level) – “#” being a digit.
OS X provides the diskutil
utility to handle drives via the their device filenames. Insert a DVD and do
diskutil list
to find out which device filename your DVD drive has (for the sake of this example, let’s say it’s disk3
). Once you know that,
diskutil info disk3
will show you all information about the disk – notably its Volume Name and, better even, its full Mount Point path, which you can extract with a regex and pipe into ln
:
ln -fhs "$(diskutil info disk3 | sed -Ene 's#[[:space:]]*Mount Point:[[:space:]]+(/Volumes/.+)#\1#p)" /path/to/DVD
will get you a symlink to the DVD volume called “DVD” in /path/to
. You can wrap that into an AppleScript or maybe AppleScript or Automator application and set it to run whenever a new video DVD is inserted (note this will leave you with an invalid symlink when you eject the disc).