查看驱动器(盘符)的批处理
程序员文章站
2022-04-10 18:52:46
复制代码 代码如下:@echo off setlocal enabledelayedexpansion for /f "skip=1 tokens=1,2 delims=\...
复制代码 代码如下:
@echo off
setlocal enabledelayedexpansion
for /f "skip=1 tokens=1,2 delims=\" %%a in ('fsutil fsinfo drives^|find /v ""') do (
set aa=%%a
set aa=!aa:~-2!
for %%i in (!aa!) do fsutil fsinfo drivetype %%i
)
pause