对于没有choice.exe 的兄弟们,这是一个小玩意儿
choice.bat
@echo off
echo please enter y or no to continue :: y/ n is jumping switch, you can also change this prompt.
set /p choice=
if {%choice%}=={} echo You entered nothing.
if {%choice%}=={y} goto :yes :: one switch else (
if {%choice%}=={n} goto :no :: another switch else (
echo you entered an identifiable word.
)
)
echo press anykey to exit.
pause >nul
:yes
echo yes
echo press anykey to exit.
pause >nul
:no
echo no
echo press anykey to exit.
pause >nul
[ Last edited by scriptor on 2006-12-23 at 02:47 PM ]
choice.bat
@echo off
echo please enter y or no to continue :: y/ n is jumping switch, you can also change this prompt.
set /p choice=
if {%choice%}=={} echo You entered nothing.
if {%choice%}=={y} goto :yes :: one switch else (
if {%choice%}=={n} goto :no :: another switch else (
echo you entered an identifiable word.
)
)
echo press anykey to exit.
pause >nul
:yes
echo yes
echo press anykey to exit.
pause >nul
:no
echo no
echo press anykey to exit.
pause >nul
[ Last edited by scriptor on 2006-12-23 at 02:47 PM ]

