You're Welcome!
:)
Printable View
You're Welcome!
:)
Interesting thread.
However, from my reading the assumption is that there is a CD in the drive.
If there's not won't you get some sortof error message about "failure reading device, Abort, Retry, Ignore" or something to that effect.
Is it possible to prevent this from happening ?
I've played around with .bat files trying to determine if a CD is present and if not display a warning message requesting the CD be inserted, but have had no success.
I'm sure Vernon will come to the rescue.
You might try something like this:Notes:Code:@echo off
set CD=F:
:Begin
cls
ctty nul
command /f /c vol %CD%|find " is "
ctty con
if errorlevel 1 goto Fail
echo *** Success reading drive %CD% ***
vol %CD%
echo.
goto End
:Fail
cls
echo.
echo *** Error reading drive %CD% ***
echo.
echo Your two options are:
echo.
echo 1) Insert a data CD in drive %CD%
echo.
echo or
echo.
echo 2) Quit trying and exit to DOS
echo.
choice /c:12 /n "Which do you prefer? ([1]/[2]): "
echo.
if errorlevel 2 goto End
goto Begin
:End
- Be sure and change that "F:" on the second line to the drive letter of your CD-ROM drive.
- CHOICE.COM and FIND.EXE must both be somewhere in your PATH.