GetFileAttributesΒΆ

GetFileAttributes returns attributes for one or more a specified files or directories.

nAttributes = GetFileAttributes(svFileNames)

Return Value

If the function succeeds, the return value contains the attributes of the specified file or directory. If svFileNames is a vector of file names, the function returns a vector of attributes. If the file does not exist or if the function fails, the return value is -1.

The attributes can be one or more of the following values:

Value Meaning
FILE_READONLY (1) The file or directory is read-only.
FILE_HIDDEN (2) The file or directory is hidden.
FILE_SYSTEM (4) The file or directory is used by the operating system.
FILE_DIRECTORY (16) ssFileName is a directory.
FILE_ARCHIVE (32) The file or directory is an archive file or directory.
FILE_NORMAL (128) The file or directory has no other set attributes.

Parameters

svFileName

svFileName specifies the name of one or more files or directories.

id-242750