By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,117 Members | 1,714 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,117 IT Pros & Developers. It's quick & easy.

SetAttrributes

P: n/a
I need to find out how to set fileAttributes for a given file.
Apparently FileInfo.SetAttributes works but i dont know how to define
FileAttributes.
For example how do i make a file Hidden, and readOnly.
Jul 21 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Bit operators.

FileAttribute.Hidden & FileAttribute.ReadOnly

I also think that you can just add the values together (Hidden + ReadOnly).

"andrew vos" <an*******@andrewvos.za.net> wrote in message
news:O#**************@TK2MSFTNGP12.phx.gbl...
I need to find out how to set fileAttributes for a given file.
Apparently FileInfo.SetAttributes works but i dont know how to define
FileAttributes.
For example how do i make a file Hidden, and readOnly.

Jul 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.