title: Why can't I copy a DLL from C:\SysWOW64 from the command line?
body: <blockquote>
    <p>I know what I'm doing is weird, please don't worry about that. What is <em>happening</em>, however, is absolutely insane.</p>
  </blockquote>
  
  <p>If I try to copy a DLL file from <code>C:\SysWOW32\</code> from the command line using <code>copy</code> on Windows 7 64-bit, I actually end up getting the file that's in <code>C:\System32\</code>. Why is this happening?</p>
  
  <p><strong>OK - dumpbin is able to differentiate the DLL files</strong></p>
  
  <pre><code>C:\Users\user\Desktop&gt;dumpbin /headers C:\Windows\System32\opengl32.dll | grep machine
              8664 machine (x64)
  
  C:\Users\user\Desktop&gt;dumpbin /headers C:\Windows\SysWOW64\opengl32.dll | grep machine
               14C machine (x86)
               32 bit word machine
  </code></pre>
  
  <p><strong>NOT OK - Other commands, like md5sum (from <a href="https://github.com/bmatzelle/gow" rel="nofollow">GOW</a>) get the wrong bytes!</strong></p>
  
  <pre><code>C:\Users\user\Desktop&gt;md5sum C:\Windows\system32\opengl32.dll
  \d1bbe227367ed791d5fcf08e132d2956 *C:\\Windows\\system32\\opengl32.dll
  
  C:\Users\user\Desktop&gt;md5sum C:\Windows\SysWow64\opengl32.dll
  \d1bbe227367ed791d5fcf08e132d2956 *C:\\Windows\\SysWow64\\opengl32.dll
  </code></pre>
  
  <p><strong>NOT OK - Copying a 64-bit DLL using the command line</strong></p>
  
  <pre><code>C:\Users\user\Desktop&gt;copy C:\Windows\System32\opengl32.dll .
          1 file(s) copied.
  
  C:\Users\user\Desktop&gt;dir opengl32.dll
  07/13/2009  06:16 PM           791,552 opengl32.dll
  
  C:\Users\user\Desktop&gt;md5sum opengl32.dll
  d1bbe227367ed791d5fcf08e132d2956 *opengl32.dll
  
  C:\Users\user\Desktop&gt;dumpbin /headers opengl32.dll | grep machine
               14C machine (x86)
               32 bit word machine
  </code></pre>
  
  <p>Wrong! Why did the 32-bit DLL get copied??</p>
  
  <p><strong>OK - Copying a 32-bit DLL using the command line</strong></p>
  
  <pre><code>C:\Users\user\Desktop&gt;copy C:\Windows\SysWOW64\opengl32.dll .
  Overwrite .\opengl32.dll? (Yes/No/All): yes
          1 file(s) copied.
  
  C:\Users\user\Desktop&gt;dir opengl32.dll
  07/13/2009  06:16 PM           791,552 opengl32.dll
  
  C:\Users\user\Desktop&gt;md5sum C:\Windows\System32\opengl32.dll
  \d1bbe227367ed791d5fcf08e132d2956 *C:\\Windows\\System32\\opengl32.dll
  
  C:\Users\user\Desktop&gt;dumpbin /headers opengl32.dll | grep machine
               14C machine (x86)
               32 bit word machine
  </code></pre>
  
  <p><strong>OK - Copying a 64-bit DLL using Explorer</strong></p>
  
  <pre><code>&lt;control-drag System32\opengl32.dll to desktop&gt;
  
  C:\Users\user\Desktop&gt;dir opengl32.dll
  07/13/2009  06:41 PM         1,039,872 opengl32.dll
  
  C:\Users\user\Desktop&gt;md5sum opengl32.dll
  585fed4cdb8034b8b58aeb8008255817 *opengl32.dll
  
  C:\Users\user\Desktop&gt;dumpbin /headers opengl32.dll | grep machine
              8664 machine (x64)
  </code></pre>
  
  <p><strong>OK - Copying a 32-bit DLL using Explorer</strong></p>
  
  <pre><code>&lt;control-drag SysWow64\opengl32.dll to desktop&gt;
  
  C:\Users\user\Desktop&gt;dir opengl32.dll
  07/13/2009  06:16 PM           791,552 opengl32.dll
  
  C:\Users\user\Desktop&gt;md5sum opengl32.dll
  d1bbe227367ed791d5fcf08e132d2956 *opengl32.dll
  
  C:\Users\user\Desktop&gt;dumpbin /headers opengl32.dll | grep machine
               14C machine (x86)
               32 bit word machine
  </code></pre>
  
  <p>Can anyone explain what's happening here?</p>