title: Best method copying folders in C++ on Windows 7
body: <p>I am working on a simple program to copy all files in folders from one drive to another using C++.  Using the Windows API function <code>CopyFile()</code>. I have used the following code:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;windows.h&gt;
  
  int main() 
  {
      std::cout &lt;&lt; "File Copier Version 1";
  
      CopyFile("U:\\whateverfile.file","U:\\whateverfile2.file",0);
  
      return 0;
  }
  </code></pre>
  
  <p>What is the best way to handle copying an entire directory and all the files in it?  Any other advice on this?  Problems I may encounter?</p>