1.

Solve : Find Drive letter of CD Drive in Batch file?

Answer»

How do I DETERMINE the drive letter of the CD drive from within a batch FILE?Most PCs with Win9x mount the CDROM as the last drive. Put a readable CD in the drive. You can test for content until you get to an error:

set %d=d:
if not exist E:\nul goto finish
set %d=e:
if not exist f:\nul goto finish
set %d=f:
if not exist g:\nul goto finish
. (continues in similar fashion, however many you want to check)
:
:finish
echo CDROM is drive %d



Discussion

No Comment Found