title: Append Data in Batch
body: <p>this is part of a logon script. The script runs every time the user logs into their computer. What the script needs to do is log to the same file every time it is run, but I do not want it to overwrite data. I want it to add to the line below. I am having trouble figuring it out, this is all I have so far:</p>
  
  <pre><code>if not exist "C:\Windows\LogonScript" mkdir C:\Windows\LogonScript"
  (echo Username: %USERNAME%
  systeminfo | findstr /c:"Host Name"
  systeminfo | findstr /c:"Domain"
  systeminfo | findstr /c:"OS Name" 
  systeminfo | findstr /c:"System Manufacturer"
  systeminfo | findstr /c:"System Model"
  systeminfo | findstr /c:"System type"
  systeminfo | findstr /c:"Total Physical Memory" 
  ipconfig | findstr IPv4
  echo Hard Drive Information:
  wmic LOGICALDISK where drivetype=3 get caption,size,FreeSpace) &gt; C:\Windows\LogonScript\%COMPUTERNAME%.txt
  
  xcopy /s C:\Windows\LogonScript\%COMPUTERNAME%.txt \\ess\Home\cgoodwin\Scripts
  
  exit
  </code></pre>