回复 21# freesoft00
横排- @echo off & setlocal enabledelayedexpansion
- for /f "delims=" %%a in ('fsutil fsinfo drives^|find /v ""') do (
- for %%b in (%%a) do (
- set "Drv=%%b"
- fsutil fsinfo drivetype !Drv:\=!|findstr /i "固定 Fixed">nul && set "v=!v! !Drv:\=!"
- )
- )
- if defined v echo,%v:~1%
- pause
复制代码 竖排- @echo off & setlocal enabledelayedexpansion
- for /f "delims=" %%a in ('fsutil fsinfo drives^|find /v ""') do (
- for %%b in (%%a) do (
- set "Drv=%%b"
- fsutil fsinfo drivetype !Drv:\=!|findstr /i "固定 Fixed">nul && echo,!Drv:\=!
- )
- )
- pause
复制代码
|