title: How do you call variables put into a text file from a batch into a batch file?
body: <p>I was Creating a quiz as a test of my skills and was able to successfully put text and a variables into a separate text file. When I tried to call them from the batch file, the variables were blank. How can I fix this? Also, if anyone can tell me how to recall a specific line, I would be grateful.</p>
  
  <p>My Code (Shortened):</p>
  
  <pre><code>Echo What is your Name?
  set /p Name=Name=
  echo Test Results: &gt; TestResults.txt
  echo Name: %Name% &gt;&gt; TestResults.txt
  cls
  echo What's 2 + 2?
  set /p Problem=2 + 2= 
  echo 2 + 2= %Problem% &gt;&gt; TestResults.txt
  cls
  echo Who is President?
  set /p President=President= 
  echo President= %President% &gt;&gt; TestResults.txt
  cls
  echo Goodbye!
  pause&gt;nul
  cls
  for /f "delims= " %%G in (TestResults.txt) do echo %%G
  pause&gt;nul
  </code></pre>