// floppies (a:, b:) can cause screen flash asking for floppy to be inserted.
//
// two batch files required - 1. foo.bat
@echo off echo simple drive check > %temp%\tmp.txt echo. >> %temp%\tmp.txt for %%a in (c:, d:, e:, f:, g:) do call bar.bat %%a cls type %temp%\tmp.txt echo.
// 2. bar.bat
%comspec% /f /c vol %1 | find /c "Vol" | choice /c:210 if not errorlevel 2 if errorlevel 1 echo %1 present >> %temp%\tmp.txt if not errorlevel 3 if errorlevel 2 echo %1 not present >> %temp%\tmp.txt
// screen output can be suppressed by wrapping
ctty nul for %%a in (c:, d:, e:, f:, g:) do call bar.bat %%a ctty con
// in foo.bat