How to change file folder attribute to Hidden

W

wurlds_wurst_coder

I want to create a directory structure and would like the folder
attributes set to hidden. How can I do this and will my program be
able to insert and delete files when this attribute is set. TIA

introspectre ATSIGN earthlink PERIOD net
 
J

Jay B. Harlow [MVP - Outlook]

wurlds_wurst_coder,
I want to create a directory structure and would like the folder
attributes set to hidden. How can I do this
You can use the GetAttributes & SetAttributes of the System.IO.File &
System.IO.Directory classes to get & set the attributes of a file or folder.

Alternatively you can use the FileSystemInfo.Attributes property inherited
by the System.IO.FileInfo & System.IO.DirectoryInfo classes. to get & set
the attributes of a file or folder.
will my program be
able to insert and delete files when this attribute is set.
As long as you have the path to the folder, yes.

Hope this helps
Jay
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top