title: Batch how to convert text document to variable
body: <p>right now i'm working on a batch file that has a simple login and register feature. While I can register a user by creating a .txt file for their username and password, I cant figure out how to convert the contents of the .txt file into a variable that I can then test for to login the user. Here is what I have now. My problem is at :sign .</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>@echo off
  title Login
  :a
  cls
  mode con: lines=10 cols=25
  echo _________________________
  echo     Select Your Choice
  echo      1) Login
  echo      2) Register
  echo _________________________
  set /p begi=:
  if '%begi%'=='2' goto reg
  if '%begi%'=='1' goto sign
  
  :reg
  cls
  set u=
  set /p u=Enter Your Username:
  pause&gt;nul
  cls
  set p=
  set /p p=Enter your Password:
  pause&gt;nul
  @echo %u% &gt; user.txt
  @echo %p% &gt; pass.txt
  pause&gt;nul
  goto a
  
  :sign
  cls
  exit</code></pre>
  </div>
  </div>
  </p>