Unicode Controls & Classes for VB6 - Version 4

clsUniFile.st_GetFileAttr Function

Returns the attributes of a certain file; the return value is a combination of [eUniFileAttributes] enum

Public Function st_GetFileAttr (ByRef sPath As String) As eUniFileAttributes
Parameter Description
ByRef sPath As String The file to check
This sample will check a file for a specified attribute
Option Explicit

Private Sub Form_Load()
Dim off As New clsUniFile

Dim lFileAttrs As eUniFileAttributes
lFileAttrs = off.st_GetFileAttr("yourfile")

If (lFileAttrs And euat_FILE_ATTRIBUTE_ARCHIVE) <> 0 Then
MsgBox "Your file has an ARCHIVE attribute"
End If
End Sub