Remove readonly attribute from directory

var di = new DirectoryInfo("SomeFolder");
di.Attributes &= ~FileAttributes.ReadOnly;

Leave a Comment