I don't understand what you want to get now.
The partition marked with "*" will be the selected one.
You want all internal partitions, don't you?
What is the output of the:
FOR /L %%A IN (1,1,9) DO ( FOR /F "delims=*" %%B IN (' ^( ECHO SEL DISK 0^&ECHO SEL PAR %%A^&ECHO DET PAR ^)^|DISKPART^|FIND "*" ') DO CALL :parse_volumes %%B ) SET Internal GOTO :EOF :parse_volumes SET Line=%* IF NOT "%Line:~13,1%"==" " SET INTERNAL=!INTERNAL! %Line:~13,1% GOTO :EOF
On your test machine?
The "Find "*" pipe should limit it to the single partition that is selected
And what would be the point of removing the subroutine?
Anyway:
DO SET Line=%%B&&SET INTERNAL=!INTERNAL! !Line:~13,1!
Wonko