tags:

views:

38

answers:

2

How to Create text file and make it's Properties Hidden and Archive and ReadOnly using C#?

+2  A: 

Check this link -

http://www.csharp-examples.net/file-attributes/

Sachin Shanbhag
+3  A: 
FileStream fs = File.Create("test.txt");
fs.Close();
File.SetAttributes(
   "test.txt", 
   FileAttributes.Archive | 
   FileAttributes.Hidden | 
   FileAttributes.ReadOnly
   );
Peter Kelly