var di = new DirectoryInfo("SomeFolder");
di.Attributes &= ~FileAttributes.ReadOnly;
More Related Contents:
- What is the difference between const and readonly in C#?
- Checking for directory and file write permissions in .NET
- Copy the entire contents of a directory in C#
- Better way to check if a Path is a File or a Directory?
- What is the difference between Directory.EnumerateFiles vs Directory.GetFiles?
- Declare a const array
- How do I delete a directory with read-only files in C#?
- How to get files in a relative path in C#
- Is there a faster way than this to find all the files in a directory and all sub directories?
- How do I get the directory from a file’s full path?
- How to get around lack of covariance with IReadOnlyDictionary?
- Getting current directory in .NET web application
- Properties.Settings.Default.Save(); -> Where is that file
- Delete files older than 3 months old in a directory using .NET
- Given full path, check if path is subdirectory of some other path, or otherwise
- .Net’s Directory Services throws a strange exception
- C# Searching for files and folders except in certain folders
- How do I get the path of the assembly the code is in?
- BackgroundWorker RunWorkerCompleted Event
- When should TaskCompletionSource be used?
- Getting full URL of action in ASP.NET MVC [duplicate]
- Am I misunderstanding LINQ to SQL .AsEnumerable()?
- Insert into C# with SQLCommand
- Double.TryParse or Convert.ToDouble – which is faster and safer?
- How do I do logging in C# without using 3rd party libraries? [closed]
- Ignoring a field during .NET JSON serialization; similar to [XmlIgnore]?
- How do you UrlEncode without using System.Web?
- How can I wrap text in a label using WPF?
- Getting the first and last day of a month, using a given DateTime object
- How do I deploy two ClickOnce versions simultaneously?