JSI Tip 6048. Freeware getcd.exe returns the drive letter of your CD-ROM drive.

Jerold Schulman

December 5, 2002

1 Min Read
ITPro Today logo in a gray background | ITPro Today

If you need to determine the drive letter of the computer's CD-ROM drive, download getcd.exe.

Oli Restorick wrote this utility to return the CD-ROM drive letter. Typing getcd.exe at a CMD prompt, return a display like D: or E:.

To use this a script:

for /f "Tokens=*" %%a in ('getcd.exe') do set CDROM=%%a

You could then use the %CDROM% variable in the remainder of the script.



Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like