title: How can I copy a large file on Windows without CopyFile or CopyFileEx?
body: <p>There is a limitation on Windows Server 2003 that prevents you from copying extremely large files, in proportion to the amount of RAM you have.  The limitation is in the CopyFile and CopyFileEx functions, which are used by xcopy, Explorer, Robocopy, and the .NET FileInfo class.</p>
  
  <p>Here is the error that you get:</p>
  
  <blockquote>
    <p>Cannot copy [filename]: Insufficient system resources exist to complete the requested service.</p>
  </blockquote>
  
  <p>The is a <a href="http://support.microsoft.com/default.aspx/kb/259837" rel="noreferrer">knowledge base article</a> on the subject, but it pertains to NT4 and 2000.</p>
  
  <p>There is also a suggestion to <a href="http://blogs.technet.com/askperf/archive/2007/05/08/slow-large-file-copy-issues.aspx" rel="noreferrer">use ESEUTIL</a> from an Exchange installation, but I haven't had any luck getting that to work.</p>
  
  <p>Does anybody know of a quick, easy way to handle this?  I'm talking about >50Gb on a machine with 2Gb of RAM.  I plan to fire up Visual Studio and just write something to do it for me, but it would be nice to have something that was already out there, stable and well-tested.</p>
  
  <p><strong>[Edit]</strong> I provided working C# code to accompany the accepted answer.</p>