title: unauthorized access exception c#
body: <p>I have this method</p>
  
  <pre><code> public void Copy(string sourcePath, string destPath)
   {
       string[] files= Directory.GetFiles(sourcePath);
       for (int i = 0; i &lt; files.Length; i++)
       {
           try
           {
               File.Copy(files[i], destPath);
           }
           catch
           {
               try
               {
                   File.Replace(files[i], destPath, null);
               }
               catch (Exception ex)
               {
                   MessageBox.Show(ex.Message);
               }
           }
      }
  }
  </code></pre>
  
  <p>when I run it I get unauthorized access exception , Access denied ! 
  any help in this !</p>