title: How do I append to a file using the COPY command
body: <p>I'm running Windows 7 Ultimate x64, but my experience dates back to DOS 3.0.</p>
  
  <p>Since like DOS 3.1 you've been able to append a file to another one with this use of the COPY command:</p>
  
  <pre><code>COPY FILE1+FILE2=FILE1
  </code></pre>
  
  <p>Making the need for a temporary FILE3 unnecessary.</p>
  
  <p>It was a very convenient command since whenever you added a new program you often needed to update your <code>CONFIG.SYS</code> and <code>AUTOEXEC.BAT</code> files.</p>
  
  <p>It also used to be that getting the order correct was importiant, otherwise you'd end up with an empty FILE1.</p>
  
  <p>But today when I tried that, it left <code>FILE1</code> untouched, and when I reversed the order, it (understandably) made <code>FILE1</code>  a copy of <code>FILE2</code>.</p>
  
  <p>Does anyone know if it's been replaced with another method, and when this change happened?</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>I've been doing more testing, and oddly even though the above code won't work, you still can sill copy from the console and append that to an existing file like this:</p>
  
  <pre><code>copy file1+con=file1
  Type some text to append to file1
  ^Z ([CTRL]+Z the End Of File character)
  </code></pre>
  
  <p>I'm wondering if my version of Windows is messed up somehow.  Can any body replicate my findings?</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>It works on 95 / 98 / ME / 2000 / XP / XP Mode / 7 Professional x64 / 8 x64. So I imagine that it's not a <code>7 Ultimate x64</code> problem, but rather an issue with my machine.</p>
  
  <p><em>*</em> Sigh *</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>Last edit, I promise. :)</p>
  
  <p>It was not an issue with my machine, it was an issue with File1.  Apparently when I first appended File2 to it, the [CTRL]+Z (EOF character) never got overwritten, causing the file to look like this:</p>
  
  <pre><code>Original Data
  Original Data
  [EOF]
  Appended Data
  Appended Data
  Appended Data
  </code></pre>
  
  <p>You can duplicate this yourself with the following experiment from at the command prompt. (Where ^Z is the character [CTRL]+Z )</p>
  
  <p>At the command prompt type:</p>
  
  <pre><code>copy con file1
  File One
  ^Z^Z
  
  copy con file2
  File Two
  ^Z
  
  copy con file3
  File Three
  ^Z
  
  copy file1+file2=file1
  
  copy file2+file3=file2
  
  TYPE file1
  TYPE file2
  </code></pre>
  
  <p>You will see:</p>
  
  <p><code>file1</code></p>
  
  <pre><code>File One
  </code></pre>
  
  <p><code>file2</code></p>
  
  <pre><code>File Two
  File Three
  </code></pre>
  
  <p>You can <code>type file2 &gt;&gt; file1</code> or use nearly any other method of concatenating files, and when you type <code>file1</code> it will still only appear to contain <code>File One</code>. BUT if you use <code>FIND "searchterm" file</code> to parse the file it will show you what's REALLY going on.  In this case type:</p>
  
  <pre><code>FIND " " file1
  </code></pre>
  
  <p>And you will be rewarded with:</p>
  
  <pre><code>---------- FILE1
  File One
  →File Two
  </code></pre>