mardi 20 février 2018

Batch file if statements are skipped over

When executing a portion of my script, it hangs on a set of if statements rather than running the output command.

:errorcheck
echo this is the error test, please verify your wireless profiles are listed below.
netsh wlan show profiles
set /p cog="did your profiles show up properly? (Y/N)"
if %cog%=="Y" goto ending
if %cog%=="N" goto retry
echo an error occured, please retry
goto errorcheck
:retry

it gets stuck in the loop and just goes back to :errorcheck I already verified the set statement works by using echo %cog%, but I cant narrow it down.

Aucun commentaire:

Enregistrer un commentaire