title: Updating the files with new file
body: <ol>
  <li><p>I have 1,000 Uniquely named folders in one large folder.</p></li>
  <li><p>Inside of each uniquely named folder these is another folder called /images.</p></li>
  <li><p>Inside each image folder there is a file named <code>"Read-Web-Site-Design-{UNIQUEFOLDERNAME}-ca-logo.png"</code></p></li>
  <li><p>I want to  replace the 1,768 <code>.png</code> files (while keeping the original name) from a <code>.png</code> file which I am supplying.</p></li>
  </ol>
  
  <p>The folder structure and filenames need to remain same.  Basically I'm  updating the old file with a new file, using the same (unique) name, 1,000 times.</p>
  
  <p>I have written this code and I am able to get all the files and directories in loop but I want to know how will I update files here,please check my code:</p>
  
  <pre><code>private List&lt;String&gt; DirSearch(string sDir)
  {
  List&lt;String&gt; files = new List&lt;String&gt;();
  try
  {
      foreach (string f in Directory.GetFiles(sDir))
      {
          files.Add(f);
  
      }
      foreach (string d in Directory.GetDirectories(sDir))
      {
          files.AddRange(DirSearch(d));
      }
  }
  catch (System.Exception excpt)
  {
      //MessageBox.Show(excpt.Message);
  }
  
  return files;
  }
  </code></pre>