title: program quits at a certain point. batch/cmd
body: <p>sup, I am making a program that takes and stores user input in a .txt file (basically stores a password) after that you can go and check the password (to maybe unlock or open something, etc)
  for some reason when I try to compare the two passwords the program quits in both ways, this is the problem, thx if you help</p>
  <p>this is the code:</p>
  <pre><code>@echo off
  
  :start
  echo -create (make a password)
  echo -check (check a password)
  set /p PROGRAM= enter opperation:
  goto %PROGRAM%
  
  :create
  cls
  set /p data= enter data: 
  echo %data% &gt; C:\Users\Hp\testfile.txt
  echo done!
  pause
  goto start
  
  :check 
  cls 
  set /p data2= what is your password? 
  for /f &quot;Delims=&quot; %%realdata in (C:\Users\Hp\testfile.txt) do (
  set TEXT=%%realdata
  )
  if %data2%==%TEXT%
  (
  pause
  goto correct
  )
  echo wrong, try again
  pause
  goto start
  
  
  :correct
  echo good job
  pause
  goto start
  </code></pre>