ylmaster 当前离线
列兵
CrLf 当前离线
论坛巡查
@echo off setlocal enabledelayedexpansion for /f "tokens=*" %%a in ('mountvol') do ( if %%a==D:\ if defined volume goto :disk set volume=%%a ) echo 找不到D:\盘 pause exit :disk mountvol d: /d mountvol l: %volume% echo 操作完成 pause复制代码
TOP
group 当前离线
上等兵
@echo off setlocal enabledelayedexpansion for /f "tokens=*" %%a in ('mountvol') do ( if %%a==D:\ if defined volume goto :disk set volume=%%a ) echo 找不到D:\盘 pause exit :disk mountvol d: /d mountvol d: %volume% echo 操作完成 pause复制代码