title: File.Copy() performance if a file already exists
body: <p>I have a project that runs as a scheduled task every 5 minutes. Among other things, the project runs through hundreds of images and copies them to a network drive in this manner:</p>
  
  <pre><code>foreach (string file in Files)
  {
      string Control = Path.GetFileNameWithoutExtension(file);
          File.SetAttributes(file, FileAttributes.Normal);
          try
          {
              File.Copy(file, destinationFolder + "\\" + Control + @".pdf", false);
          }
          catch (Exception err)
          {
              Console.Writeline(err.ToString());
          }
  }
  </code></pre>
  
  <p>The "false" argument, of course, is telling it NOT to overwrite a file if it already exists.</p>
  
  <p>Is this faster/better practice than first checking if the file already exists and then only copying if the file does not exist? (see below)</p>
  
  <pre><code>foreach (string file in Files)
  {
      if (File.Exists(destinationFolder + "\\" + ControlNumber + ".pdf") == false)
      {
          File.SetAttributes(file, FileAttributes.Normal);
          File.Copy(file, destinationFolder + "\\" + ControlNumber + @".pdf");
      }
  }
  </code></pre>
  
  <p>My gut tells me that the first is the better way. However, I'm relatively new to programming and would love to know which is better, faster, more widely accepted, etc..</p>
  
  <p>It may or may not be helpful to know that the remote drive/folder I am copying to contains 4TB of image data (millions of images).</p>