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

Syntax
Public Function st_GetFileAttr (ByRef sPath As String) As eUniFileAttributes
Parameters
Parameter Description
ByRef sPath As String The file to check
Remarks
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