greetings again, its me back needing more batch help.
I already know how to test for an empty variable by if %choice%==[%1]==[] goto whatever
But what I'd like to know is how to make the variable empty again after setting it. For example.
In this example if the user presses enter without typing anything it goes back to :start.
Ok so the user types "one" then they see the next "section"
then it goes back to the first :start "section."
But the issue is that if the user presses enter again after coming back to :start (without typing anything this time around) the cmd acts like they typed in the last thing typed in. So I'd like to stop that from happening.
---------------------------------------
@echo off
:start
cls
echo hey there.
echo you can pick one or two
set /p choice= choose either.
if %choice%==[%1]==[] goto start
if /i %choice%==one goto one
if /i %choice%==two goto two
:one
cls
echo picked one first.
pause
goto start
:two
cls
echo meh
pause
goto start
------------------------------
you've never failed me before!
