Possible Duplicate:
How we can add write access to a directory programmaticaly in C#?
When I make a Directory with Directory class in C#, it is read only. what is the problem? How we can change this attribute programmatically?
Possible Duplicate:
How we can add write access to a directory programmaticaly in C#?
When I make a Directory with Directory class in C#, it is read only. what is the problem? How we can change this attribute programmatically?
When it is read only because of permissions, the most likely reason is that permissions are inherited from the parent directory.
You'll need to post the output from the following commands:
icacls origDirPath
icacls origDirPath\newDirName
and also which user account the process is running under. This will help us get to the bottom of what's going on.