title: How to write to different lines of a text file with batch
body: <p>I wrote the following code:</p>
  
  <pre><code>@echo off
  title Kiel Configurations
  rem Credits Will Go Here
  rem Website Here
  color 08
  echo **********************************************************************
  echo **************************Kiel Configuration**************************
  echo **********************************************************************
  echo ======================================================================
  echo Use yes/no to configure the following options
  pause
  cls
  echo Would you like it to run in fake mode? (recommended for slow computers or for the paranoid)
  set /p FakeModeVar=(yes/no):
  cls
  echo Would you like to close skype?
  set /p SkypeVar=(yes/no):
  cls
  echo Woud you like to close spotify?
  set /p SpotifyVar=(yes/no):
  cls
  echo Would you like to close steam?
  set /p SteamVar=(yes/no)
  cls
  echo Would you like to close chrome? (reccommended)
  set /p ChromeVar=(yes/no):
  cls
  echo Which chrome profile would you like chrome to open as? (Ask me if unsure)
  set /p ChromeProfile=(1,2,3...):
  cls
  echo Now configurating you settings...
  pause &gt;nul
  if %FakeModeVar%==yes goto Locate1
  if %FakeModeVar%==no goto Locate2
  :Locate1
  echo yes&gt; ConfigVarini.txt
  goto Locate3
  :Locate2
  echo no&gt; ConfigVarini.txt
  goto Locate3
  :Locate3
  if %SkypeVar%==yes goto Locate4
  if %SkypeVar%==no goto Locate5
  :Locate4
  echo yes&gt;&gt; ConfigVarini.txt
  goto Locate6
  :Locate5
  echo no&gt;&gt; ConfigVarini.txt
  goto Locate6
  :Locate6
  if %SpotifyVar%==yes goto Locate7
  if %SpotifyVar%==no goto Locate8
  :Locate7
  echo yes&gt;&gt;&gt; ConfigVarini.txt
  goto Locate9
  :Locate 8
  echo no&gt;&gt;&gt; ConfigVarini.txt
  goto locate9
  :Locate9
  if %SteamVar%==yes goto Locate10
  if %Steamvar%==no goto Locate11
  :Locate10
  echo yes&gt;&gt;&gt;&gt; ConfigVarini.txt
  goto Locate12
  :Locate11
  echo no&gt;&gt;&gt;&gt; ConfigVarini.txt
  goto Locate12
  :Locate12
  if %ChromeVar%==yes goto Locate13
  if %ChromeVar%==no goto Locate14
  :Locate13
  echo yes&gt;&gt; ConfigVarini.txt
  goto Locate15
  :Locate14
  echo no&gt;&gt;&gt;&gt;&gt; ConfigVarini.txt
  goto Locate15
  :Locate15
  if %ChromeProfile%==1 goto Locate16
  if %ChromeProfile%==2 goto Locate17
  if %ChromeProfile%==3 goto Locate18
  :Locate16
  echo 1&gt;&gt;&gt;&gt;&gt; ConfigVarini.txt
  goto End
  :Locate17
  echo 2&gt;&gt;&gt;&gt;&gt;&gt; ConfigVarini.txt
  goto End
  :Locate18
  echo 3&gt;&gt;&gt;&gt;&gt;&gt; ConfigVarini.txt
  goto End
  :End
  cls
  echo Files Configured!
  </code></pre>
  
  <p>When i run it i want it to take the user through a configuration process then save their preferences to a text file called <code>ConfigVarini.txt</code>
  Then i will have another program that reads the settings on the text file. However the file on says</p>
  
  <blockquote>
    <p>yes yes</p>
  </blockquote>
  
  <p>and it saves no other settings.</p>