copy all type format file from folder in c#
<p>I am trying to copy all  format file (.txt,.pdf,.doc ...) file from source folder to destination.</p>

<p>I have write code only for text file.</p>

<p>What should I do to copy all format files?</p>

<p>My code:</p>

<pre><code>string fileName = "test.txt";
string sourcePath = @"E:\test222";
string targetPath =  @"E:\TestFolder"; 

string sourceFile = System.IO.Path.Combine(sourcePath, fileName);
string destFile = System.IO.Path.Combine(targetPath, fileName);
</code></pre>

<p>Code to copy file:</p>

<pre><code>System.IO.File.Copy(sourceFile, destFile, true);
</code></pre>
