@echo off
C:
set choice=
set /p choice=Do you wish to continue?
If %choice%==no GOTO SHUTDOWN
If %choice%==yes GOTO next
:next
echo It didn't work
exit
:SHUTDOWN
set choice=
set /p choice=Your computer is about to shutdown.Do you wish to continue?
If %choice%==no shutdown -a
If %choice%==yes shutdown -s -t:90
pause
exit
That is my first batch file. Ive been having some problems with it looping. It will ask eache question over and over and over again. If someone could tell me how to fix it that would be great. I use windows xp. Thanks
(p.s. if anyone has some good sites that tell how to create batch files please post)
C:
set choice=
set /p choice=Do you wish to continue?
If %choice%==no GOTO SHUTDOWN
If %choice%==yes GOTO next
:next
echo It didn't work
exit
:SHUTDOWN
set choice=
set /p choice=Your computer is about to shutdown.Do you wish to continue?
If %choice%==no shutdown -a
If %choice%==yes shutdown -s -t:90
pause
exit
That is my first batch file. Ive been having some problems with it looping. It will ask eache question over and over and over again. If someone could tell me how to fix it that would be great. I use windows xp. Thanks
(p.s. if anyone has some good sites that tell how to create batch files please post)
Comment