按需修改下- @echo off&setlocal enabledelayedexpansion
- set "_NVMe=SSD"
- set "_USB=USB"
- set "_SATA=HDD"
- for /f "tokens=2,4,5" %%a in ('"echo list disk|diskpart|findstr /irc:"磁盘 *[0-9]""') do (
- for /f "tokens=3" %%i in ('"(echo sel disk %%a & echo detail disk & echo list part)|diskpart|findstr /irc:"类型 *:""') do (
- if defined _%%i echo Disk%%a Type: !_%%i! %%b %%c
- )
- )
- pause
复制代码
|