title: Why wont this batch file work?
body: <p>I was trying to create a simple program that would show up your name after you entered it.</p>
  
  <p>After spending a few hours trying to get this batch file to work on a windows 10 and windows 7 computers, I can't still figure out what is the problem. After you input your answer whether or not you confirm that that is your name, it is still not working. </p>
  
  <p>I've tried to debug by putting <code>pause</code> just about everywhere and it continues not to work.</p>
  
  <p>Can somebody please point out what is wrong? Thanks.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>ECHO OFF 
  setlocal
  
  COLOR A
  cls
  :getName
  ECHO test
  echo Please input name.
  set "name="
  SET /P NAME=
  if not defined NAME goto getName
  ECHO %NAME%, is this correct? Y/N
  set /p 097=
  if %O97%==Y goto :begin
  set favvid=0
  set hack=0
  :b
  echo Input name
  set name=
  set /P name=
  echo %name%, correct? Y/N
  set 897=
  set /p 897=
  if %897%==N goto :c
  if %897%==Y goto :begin
  :c
  echo Input name
  set name=
  set /P name=
  echo %name%, correct? Y/N
  set 897=
  set /p 897=
  if %897%==N goto b
  if %897%==Y goto begin
  echo Name = %NAME% Is now your name. Too many attempts
  :begin
  echo Hello %Name%
  pause
  </code></pre>