How to: Determine if a File is Hidden in Visual Basic
Thecan be used to get a object, which contains information about the specified file, including a enumeration.
To determine if a file is hidden
Get a FileInfo object for the file you wish to examine. This example gets a FileInfo object for the file Testfile.txt.
Get a FileAttributes object from the FileInfo object. This example gets FileAttributes from the FileInfo object.
Query FileAttributes to determine if the file is hidden. This example determines if the file is hidden and displays a result accordingly.