Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Change a folder Hidden attribute 1

Status
Not open for further replies.

waytech2003

Programmer
Jul 14, 2003
316
US
Have searched for this but have not found a way for it to be done. I know I can change a File Hidden attribute using SetAttr, but was wondering how to change a Folder Hidden attribute.

I need to change the Hidden attribute of an existing folder.

Would I use FSO or can it be done using Shell32? An example would be appreciated.
 
I just checked, and it appears that SetAttr works on folders.

Ex:

' Set folder hidden
Call SetAttr("C:\Data\TekTips", vbHidden)

' Un-hide folder
Call SetAttr("C:\Data\TekTips", vbNormal)

After each one, I checked the properties for the folder (using windows explorer) and the hidden property was set appropriately.



-George

"The great things about standards is that there are so many to choose from." - Fortune Cookie Wisdom
 
Thank you for the quick reply.

I do not know why it did not work for me when I tried to get this to work yesterday, but as you said, it does work.

Must have been, "one of those days" [2thumbsup]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top