Tuesday, September 1, 2009

How to Create Folder/Directory in C# with Folder Hidden Attribute

DirectoryInfo Dif = new DirectoryInfo(@"C:\SampleDir");
Dif.Create();
Dif.Attributes = FileAttributes.Hidden;
image
You may also apply following attributes as well

ReadOnly,Hidden,System,Directory,Archive Device ,Normal , Temporary ,
parseFile, ReparsePoint, Compressed , Offline ,NotContentIndexed,Encrypted
Post a Comment