title: unable to write in line variable writing in batch cmd
body: <p>I apologize for the vagueness of my question.</p>
  
  <p>I wanted to be able to take information and stack it in a file, the pull the information from the file in line.</p>
  
  <p>The way that I am able to do this at this time is with:</p>
  
  <pre><code>:: simple setting of variables
  Set var1=var..
  Set var2=var..
  Set var3=var..
  Set fullvar=%var1%%var2%%var3%
  :: now push to file
  Echo fullvar &gt; file
  </code></pre>
  
  <p>Before I asked my question I did not realize I could stack my variables in this way.</p>
  
  <p>I am going back through batch tutorials.</p>
  
  <p>Can this question be closed?</p>
  
  <p>Thank you for you assistance.</p>
  
  <h2>Original transcript below</h2>
  
  <p>I am looking for a way to put my variables into a file in line.
  With >> I can append a new line, I want to have my var% in line...</p>
  
  <p>Ex:</p>
  
  <pre><code>Type file2
  </code></pre>
  
  <p>returns
      %var1% %var2% %var3%</p>
  
  <p>Instead of;</p>
  
  <pre><code>%var1%
  %var2%
  %var3%
  
  :eof
  </code></pre>
  
  <p>I want to be able to use them as %1 %2 %3 in my batch program.</p>
  
  <p>Here is the basic information I am using.</p>
  
  <pre><code>Echo off
  cls
  ping /n 1 ipaddress1Var &gt; file
  ping /n 1 ipaddress2Var &gt;&gt; file
  findstr /i "ttl=" file &gt; file2
  Type file2
  pause
  :eof
  </code></pre>
  
  <p>this returns the line included with ttl= to the new file. 
  I am not sure how to write what I want this to do;</p>
  
  <p>When I > or >> to file2 I want to add to the line that it is written to instead of a new line.</p>
  
  <p>Unfortunatly I do not have my computer I wrote the batch file on with me. I want to expand the capabilities of the script.</p>
  
  <p>I am learning more intermediate batch programming on a WinXP laptop.</p>
  
  <p>Any help or pointing in the right direction would help. This does not google well.</p>
  
  <p>Cheers</p>
  
  <p>Maybe </p>
  
  <pre><code>Echo %var1% %var2% %var3% &gt; file# 
  </code></pre>
  
  <p>Would work for building the file in line. I am just not sure how to read and re-assign the variables properly....</p>