Hi,

Files and \irectories in Windows (XP) have the property "Read Only".
How can I, programmatically, set the "Read Only" property of a certain directory so it will apply to all its content (files and subdirectories) ?

The FileInfo class has a "ReadOnly" property, so it's not a problem, we can go over all the files in the directory recursivelt and set their ReadOnly property to false.
But directories don't have this property. Instead they have the "Attributes" property, which can be assigned with FileAttributes.ReadOnly, but I tried several things and it didn't actually worked.

A solution which doesn't include enumerating all the files and sub directories in the directory will be preferred, but any other solution will be OK too.

Regards