- (set a=list vol
- set a=%a%#list vdisk
- set a=%a%#list disk
- set a=%a%#sel disk=0
- set a=%a%#detail disk
- set a=%a%#list part
- setlocal enabledelayedexpansion
- for /l %%a in (1 1 99) do (
- set a=!a!#sel disk=next
- set a=!a!#detail disk
- set a=!a!#list part
- ))
- set a=%a:#=^^&echo;%
- (for /f "skip=5 delims=" %%Z in ('^(echo;%a%^)^|diskpart') do (echo %%z)
复制代码
|