Calling dir.Create method will create folder, then you're ready to set
its attirbute as Hidden. If you want to check whether operation is
successful, you can use the code in a Try-Catch block and handling
exceptions in Catch block. However, i'm not fully sure what you want,
if you're referring to an existing directory to make it hidden, remove
Create method just use:
Dim dir As New System.IO.DirectoryInfo("c:\myhidden")
dir.Attributes = IO.FileAttributes.Hidden
Plus, it depends on what you want to achieve exaclty, for instance, to
make all files hidden inside that directory you must use FileInfo
class in a loop by iterating.
Onur Güzel