title: Copy files exclude one folder
body: <p>Basically I want to copy everything within a folder excluding one folder, which happens to be where logs are stored for my program. (<em>I know I could just store logs elsewhere, but I have my reasons</em>). So far I have:</p>
  
  <pre><code>private void btnCopyFiles_Click(object sender, EventArgs e)
      {
          try
          {
              //Copy all the files
              foreach (string newPath in Directory.GetFiles(@"\\xxx\yyy", "*.*",
                              SearchOption.AllDirectories)
                              .Where(p =&gt; p != Logging.fullLoggingPath))
                  File.Copy(newPath, newPath.Replace(@"\\xxx\yyy", @"C:\bbb"));
              using (StreamWriter w = File.AppendText(Logging.fullLoggingPath))
              {
                  Logging.Log("All necessary files copied to C:\\bbb", w);
              }
          }
          catch
          {
              using (StreamWriter w = File.AppendText(Logging.fullLoggingPath))
              {
                  Logging.Log("Error copying files, make sure you have permissions to access the drive and write to the folder.", w);
              }
          }
      }
  </code></pre>
  
  <p>How can I modify this to exclude one specific folder within <code>\\xxx\yyy</code></p>