title: User Input not being taken? Batch file
body: <p>I've been making this code for an unofficial coding class of mine when one of my students ran into a problem where the process just ends task every time one of the expected answers is taken. I checked his code over and over again, and don't see where the problem is.</p>
  
  <pre><code>    @echo off
  rem Everywhere you see "rem" as a command is simply developer notes to help keep track of what and where everything is. Deleting all rem commands will not affect the program.
  if not exist "C:\Program Files\Led\Ping Testor\version\1.7.info" goto new
  if exist "C:\Program Files\Led\Ping Testor\version\1.7.info" goto old
  rem Checks for first-time launch on local machine.
  
  :new
  if not exist "C:\Program Files\Led"
  (
  cd "C:\Program Files\"
  md Led
  )
  if not exist "C:\Program Files\Led\Ping Testor"
  (
  cd "C:\Program Files\Led"
  md "Ping Testor"
  )
  if not exist "C:\Program Files\Led\Ping Testor\version"
  (
  cd "C:\Program Files\Led\Ping Testor\"
  md "version"
  )
  if not exist "C:\Program Files\Led\Ping Testor\version\1.7.info"
  (
  cd "C:\Program Files\Led\Ping Testor\version"
  echo "1.7235 Release. Beta Officially Closed. More Information at LedDevelopment.CU.CC/main/products/led-ping-testor" &gt;1.7.info
  )
  goto old
  rem Creates all necessary directories if they don't exist and adds version information to the directory.
  
  :old
  title Led Development AB 2015 - 2016
  color 0a
  mode con: cols=65 lines=18
  cls
  rem Window setup (Initial).
  
  :a
  echo Led Ping Testor                                        v1.7235(R)   
  rem The (R) after the version number indicates state/build type. (R) in this case means release, as in finished product. (B) is for Beta (Used for testing and developing by both users and proffessional developers), and there's (A) which is the essentials of the code for the program to function at all(Led Development Team Only).Occasionally, an (E) (evaluation copy) is developed.
  echo ===============                                        ==========
  echo Welcome to the Led Ping Testor. Please choose 1 to test your pingto our official website server or 2 to test your connection to a custom IP Address/Website. If you don't understand any of this,  choose option 1.
  echo.
  echo NOTE: A log file keeps track of all the ping results,as well as  time and date,but no personal information is kept,including your IP Address or computer name. To view the log file,type "log"     without the quotation marks and hit enter. Similarly,if you wish to clear the log of all data,type "logclr" without the quotation marks and hit enter.
  rem Intro text.
  
  set /p op=
  if %op%== 1 goto ping1
  if %op%== 2 goto ping2a
  if %op%== log goto log
  if %op%== logclr goto logclr
  rem This checks for all eligible user input for this stage.
  goto old
  rem This takes user back to Main Screen in case of non-eligible input.
  
  :log
  cls
  if exist "C:\Program Files\Led\Ping Testor\log.txt"
  (
  cd "C:\Program Files\Led\Ping Testor\"
  start log.txt
  )
  rem Opens log if exists.
  
  if not exist "C:\Program Files\Led\Ping Testor\log.txt"
  (
  cls
  echo The log file is empty, thus cannot be openned.
  pause
  goto a
  )
  rem Gives error message if log doesn't exist.
  
  
  :logclr
  cls
  cd "C:\Program Files\Led\Ping Testor\"
  del log.txt
  goto old
  
  :ping1
  echo Please choose how many times you want to ping the host.
  set /p %numb%
  if %numb% &lt; 1 goto ping1a
  if %numb% &gt; 99999 goto ping1a
  rem Checks if user input was between 1 and 99999 to confirm user input as an interger (numbers only).
  cls
  rem If user input isn't an integer between 1 and 99999, error message explaining appears in a new  window.
  msg %username% Warning: Not a numerical value between 1 and 99999. Please check your spelling and remove all letters, special characters and spaces.
  goto ping1
  
  :ping1a
  cls
  title Pinging 185.28.21.39...
  cls
  cd "C:\Program Files\Led\Ping Testor\"
  echo ========================================================= &gt;&gt;log.txt
  echo Host:185.28.21.39          Ping Count:%numb% &gt;&gt;log.txt
  echo Include this in any bug reports for the Ping Testor. &gt;&gt;log.txt
  echo %date% &gt;&gt; log.txt
  rem All this chunck of code above is the injection of data to the log file.
  
  :ping11
  echo Led Ping Testor
  echo ===============
  echo The ping is called time, and is displayed upon every loop.
  echo.
  ping 185.28.21.39 -n %numb% &gt;&gt;log.txt
  ping 185.28.21.39 -n %numb%
  ping localhost -n 2 &gt;nul
  cls
  goto ping11
  rem And this chunck performs the same thing as above but infront of the user.
  </code></pre>
  
  <p>The problem is here:</p>
  
  <pre><code>echo Welcome to the Led Ping Testor. Please choose 1 to test your pingto our official website server or 2 to test your connection to a custom IP Address/Website. If you don't understand any of this,  choose option 1.
  echo.
  echo NOTE: A log file keeps track of all the ping results,as well as  time and date,but no personal information is kept,including your IP Address or computer name. To view the log file,type "log"     without the quotation marks and hit enter. Similarly,if you wish to clear the log of all data,type "logclr" without the quotation marks and hit enter.
  rem Intro text.
  
  set /p op=
  if %op%== 1 goto ping1
  if %op%== 2 goto ping2a
  if %op%== log goto log
  if %op%== logclr goto logclr
  rem This checks for all eligible user input for this stage.
  goto old
  rem This takes user back to Main Screen in case of non-eligible input.
  </code></pre>
  
  <p>Yes, I know the :ping2 still doesn't exist because i didn't add it to this code yet, but none of the existing commands work either, like ping1 (by pressing 1), log and logclr. Logclr, sometimes, just seems to kind of "refresh" the screen.
  Thanks for your help in advance. I will add the person's name to the credits somewhere along the lines. Maybe on the website (leddevelopment.cu.cc/main/products/led-ping-testor/).</p>