title: C# Copying a Folder to another destination with Security/Permission Settings
body: <p>I am making a program where it could copy a Folder and Transfer it to another location, including the attribute, permissions, security settings.</p>
  
  <p>So Far I got the Attribution to work, but am having problems with the permissions/security settings. Here are my code:</p>
  
  <pre><code>Directory.CreateDirectory(Destination);
  DirectoryInfo DestAttribute = new DirectoryInfo(Destination);
  DestAttribute.Attributes = Source.Attributes; // Copies Attributes from Source to Dest
  
  AuthorizationRuleCollection Rule;
  DirectorySecurity DestSecurity = Source.GetAccessControl();
  Rule = DestSecurity.GetAccessRules(true, true, typeof(NTAccount));
  DestSecurity.AddAccessRule(Rule);
  DestAttribute.SetAccessControl(DestSecurity);
  </code></pre>
  
  <p>Anyone have any suggestion on getting this to work ? 
  Thank you everyone for all the help.</p>