
CODE: [Copy to clipboard]───────────────── 版务记录 ─────────────────@echo off
set "p=c d e f g h i j k l m n o p q r s t u v w x y z"
for %%i in (%p%) do (
for /f "tokens=1-4 delims= " %%a in ('vol %%i: 2^>^&1') do (
if "%%a"=="设备未就绪。" call set g=%%g%% %%i
if "%%d"=="我的光盘" call set g=%%g%% %%i
))
echo 光驱盘符是 %g%
pause
CODE: [Copy to clipboard]@echo off
for /f "tokens=2 delims==" %%a in ('wmic LogicalDisk where "DriveType='5'" get * /value ^| findstr /i "^DeviceID"') do echo 光驱盘符:%%a
| 欢迎光临 中国DOS联盟论坛 (http://cndos.fam.cx/forum/) | Powered by Discuz! 2.5 |