Hidden Attribute causes UnauthorizedAccessException in File.Copy

If you are getting "System.UnauthorizedAccessException: Access to the path 'destFileName' is denied" when you call File.Copy to copy and overwrite a file, the two more obvious possible causes are documented on MSDN: Exception Condition UnauthorizedAccessException The caller does not have the required permission. -or- destFileName is read-only. I ran into a third possible cause last week. If the … Continue reading Hidden Attribute causes UnauthorizedAccessException in File.Copy