写了一个显示选择菜单的批处理,可是执行不了“choice/c:12345 /t:2,20 . 请在20秒内作出选择,默认选择第一项。”这个地方,总是显示‘Bad command or file name’,请问,这是什么原因阿,请高手能够给与改正
@echo off
::choice /c:y /n /t:y,1 >nul
CLS
@echo off
ECHO.
echo 中文系统恢复&备份光盘
echo ========================================
echo.
echo 1、恢复XP系统
echo 2、备份XP系统(备份到D盘分区)
echo 3、格式化C盘(NTFS)
echo 4、格式化C盘(FAT32)
echo 5、重新启动
echo.
choice/c:12345 /t:2,20 . 请在20秒内作出选择,默认选择第一项。
if errorlevel 5 goto exit
if errorlevel 4 goto FAT32
if errorlevel 3 goto NTFS
if errorlevel 2 goto back
if errorlevel 1 goto rec
:rec
cls
call driver.bat
call re.bat
goto quit
:back
cls
call driver.bat
call ba.bat
goto quit
:NTFS
cls
call driver.bat
call NTFS.bat
goto quit
:FAT32
cls
call driver.bat
call FAT32.bat
goto quit
:exit
echo 再见
func -r
:quit
X:
@echo off
cls
set CDROM=
set RAMDRIVE=
:end
@echo off
::choice /c:y /n /t:y,1 >nul
CLS
@echo off
ECHO.
echo 中文系统恢复&备份光盘
echo ========================================
echo.
echo 1、恢复XP系统
echo 2、备份XP系统(备份到D盘分区)
echo 3、格式化C盘(NTFS)
echo 4、格式化C盘(FAT32)
echo 5、重新启动
echo.
choice/c:12345 /t:2,20 . 请在20秒内作出选择,默认选择第一项。
if errorlevel 5 goto exit
if errorlevel 4 goto FAT32
if errorlevel 3 goto NTFS
if errorlevel 2 goto back
if errorlevel 1 goto rec
:rec
cls
call driver.bat
call re.bat
goto quit
:back
cls
call driver.bat
call ba.bat
goto quit
:NTFS
cls
call driver.bat
call NTFS.bat
goto quit
:FAT32
cls
call driver.bat
call FAT32.bat
goto quit
:exit
echo 再见
func -r
:quit
X:
@echo off
cls
set CDROM=
set RAMDRIVE=
:end

