file and folder attributes
3
Check the attributes of a file or folde
Function ShowFileAttr(File) ' File can be a file or folder
Dim result, attr
attr = File.Attributes
If attr = 0 Then
ShowFileAttr = "Normal"
Exit Function
End If
If attr And FileAttrDirectory Then ShowFileAttr = "Directory" : Exit Function
If attr And FileAttrReadOnly Then ShowFileAttr = "Read-Only" : Exit Function
If attr And FileAttrHidden Then ShowFileAttr = "Hidden" : Exit Function
If attr And FileAttrSystem Then ShowFileAttr = "System" : Exit Function
If attr And FileAttrVolume Then ShowFileAttr = "Volume" : Exit Function
If attr And FileAttrArchive Then ShowFileAttr = "Archive" : Exit Function
If attr And FileAttrAlias Then ShowFileAttr = "Alias" : Exit Function
If attr And FileAttrCompressed Then ShowFileAttr = "Compressed" : Exit Function
End Function
Comments
Fri. Jul. 14th, 2006 6:21 AM
SurfMan
SurfMan





