Hi,
how to find and change attributes of hidden folders inside a drive and make them unhide (Except Folders, say Recycler and System Volume Information)
Printable View
Hi,
how to find and change attributes of hidden folders inside a drive and make them unhide (Except Folders, say Recycler and System Volume Information)
you need to use a recursive dir or fso method to loop through all folders and subfolders, search in this forum, many examples
to change the attributes
this leaves all other attributes the same, just removes the hiddenvb Code:
Set fs = CreateObject("scripting.filesystemobject") Set fol = fs.getfolder(myfolder) If (fol.Attributes And vbDirectory = vbDirectory) And (fol.Attributes And vbHidden = vbHidden) Then fol.Attributes = fol.Attributes - vbHidden
setattr appears to give error with folders
Or....
vb Code:
Call MkDir("C:\mydir") Call SetAttr("C:\mydir", vbHidden Or vbSystem) Call SetAttr("C:\mydir", vbNormal) Call RmDir("C:\mydir")
yeah i tried setattr, but it errored each time i tested with folder
that was the only reason i went to fso
Sorry for being offline for so many days.
just logged in and trying the code. Thanx.