2.6 File Attributes

The following attributes are defined by Windows for files and directories. They can be used in any combination unless noted in the description of the attribute's meaning. There is no file attribute with the value 0x00000000 because Windows interprets a value of 0x00000000 in the FileAttributes field to mean that the file attributes for this file MUST NOT be changed when setting basic information for the file.

Value Meaning

FILE_ATTRIBUTE_ARCHIVE

0x00000020

A file or directory that needs to be archived. Applications use this attribute to mark files for backup or removal.

FILE_ATTRIBUTE_ATOMIC_WRITE

0x00000200

This flag is not supported. <84>

FILE_ATTRIBUTE_COMPRESSED

0x00000800

A file or directory that is compressed. For a file, all of the data in the file is compressed. For a directory, compression is the default for newly created files and subdirectories.

FILE_ATTRIBUTE_DIRECTORY

0x00000010

This item is a directory.

FILE_ATTRIBUTE_ENCRYPTED

0x00004000

A file or directory that is encrypted. For a file, all data streams in the file are encrypted. For a directory, encryption is the default for newly created files and subdirectories.

FILE_ATTRIBUTE_HIDDEN

0x00000002

A file or directory that is hidden. Files and directories marked with this attribute do not appear in an ordinary directory listing.

FILE_ATTRIBUTE_NORMAL

0x00000080

A file that does not have other attributes set.

This attribute is valid only when no other flags are set. This flag MUST be ignored if other flags are set.

This flag exists solely to provide a means to clear all other flags.

FILE_ATTRIBUTE_NOT_CONTENT_INDEXED

0x00002000

A file or directory that is not indexed by the content indexing service.

FILE_ATTRIBUTE_OFFLINE

0x00001000

The data in this file is not available immediately. This attribute indicates that the file data is physically moved to offline storage. This attribute is used by Remote Storage, which is hierarchical storage management software.

FILE_ATTRIBUTE_READONLY

0x00000001

A file or directory that is read-only. For a file, applications can read the file but cannot write to it or delete it. For a directory, applications cannot delete it, but applications can create and delete files from that directory.

FILE_ATTRIBUTE_REPARSE_POINT

0x00000400

A file or directory that has an associated reparse point.

FILE_ATTRIBUTE_SPARSE_FILE

0x00000200

A file that is a sparse file.

FILE_ATTRIBUTE_SYSTEM

0x00000004

A file or directory that the operating system uses a part of or uses exclusively.

FILE_ATTRIBUTE_TEMPORARY

0x00000100

A file that is being used for temporary storage. The operating system may choose to store this file's data in memory rather than on mass storage, writing the data to mass storage only if data remains in the file when the file is closed.

FILE_ATTRIBUTE_XACTION_WRITE

0x00000400

This flag is not supported. <85>

Page view tracker