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

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.



Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish