I have to display the attributes of a file in a lits box. I am using the attached code to get the attribute.
The problem I am getting is that even though I have set a known file to Hidden, i get the error message shown in the attached image.
If I change fi.attributes to FileAttributes, it always sets fileHidden to "False"
Can someone please enlighten me to what I am doing wrong?
(I am doing stuff like ensuring the file exists etc before testing the attributes)
Dim fi As New FileInfo(fileName)
If fi.Attributes.Hidden() = True Then
fileHidden = "True"
fileHidden = "False"