Ich würde das so machen:
Code:
@echo off
echo Formatieren
set /p a=Welche Partition soll formatiert werden?
if %a% == C goto :format1
if %a% == D goto :format2
if not %a% == C goto :Error
if not %a% == D goto :Error
:format1
cls
format c:
goto :end
:format2
cls
format d:
goto :end
:Error
echo Falsche Datenträgerbezeichnung angegeben!
pause
goto :end
:end
quit