@CDROM[d:] : Returns 1 if the drive is an optical drive (CD-ROM, CD-RW, DVD, etc) or 0 otherwise. The drive letter must be followed by a colon.
If the argument is a partial filename without a drive, @CDROM will expand the filename to get the drive.
Examples:
echo %@cdrom[C:]
0
echo %@cdrom[G:]
1