Attribute value that determines the file objects
to be searched for.
The bit values are shown in the following list:
31-14
13
MUST_HAVE_ARCHIVED (0x00002000)
Must-Have Archive bit; excludes files without the archive bit set if bit
13 is set to 1. Files may have the Archive bit set if bit 13 is set to 0.
12
MUST_HAVE_DIRECTORY (0x00001000)
Must-Have Subdirectory bit; excludes files that are not subdirectories if
bit 12 is set to 1. Files may have the Subdirectory bit set if bit 12 is
set to 0.
11
10
MUST_HAVE_SYSTEM
(0x00000400)
Must-Have System File bit; excludes nonsystem files if bit 10 is set to
1. Files may be system files if bit 10 is set to 0.
9
MUST_HAVE_HIDDEN (0x00000200)
Must-Have Hidden File bit; excludes nonhidden files if bit 9 is set to 1.
Files may be nonhidden if bit 9 is set to 0.
8
MUST_HAVE_READONLY
(0x00000100)
Must-Have Read-Only File bit; excludes writeable files if bit 8 is set to
1. Files may be read-only if bit 8 is set to 0.
7-6
5
FILE_ARCHIVED
(0x00000020)
May-Have Archive bit; includes files with the Archive bit set if bit 5 is
set to 1. Excludes files with the Archive bit set if bit 5 is set to 0.
4
FILE_DIRECTORY (0x00000010)
May-Have Subdirectory bit; includes files that are subdirectories if bit
4 is set to 1. Excludes files that are subdirectories if bit 4 is set to
0.
3
2
FILE_SYSTEM (0x00000004)
May-Have System File bit; includes system files if bit 2 is set to 1. Excludes
system files if bit 2 is set to 0.
1
FILE_HIDDEN
(0x00000002)
May-Have Hidden File bit; includes hidden files if bit 1 is set to 1. Excludes
hidden files if bit 1 is set to 0.
0
FILE_READONLY
(0x00000001)
May-Have Read-Only File bit; includes read-only files if bit 0 is set to
1. Excludes read-only files if bit 0 is set to 0.
These
bits may be set individually or in combination. For example, an attribute
value of 0x00000024 (bits 5 and 2 set to 1) indicates searching for system
files that have been archived.
Bits 8 through 13 are "Must-Have" flags. These allow you to obtain files
that definitely have the given attributes. For example, if the Must-Have
Subdirectory bit is set to 1, then all returned items are subdirectories.
If a Must-Have bit is set to 1, and the corresponding May-Have bit is set
to 0, no items are returned for that attribute.
The attribute FILE_NORMAL (0x00000000) can be used to include files with
any of the above bits set.
flAttribute cannot specify the volume label. Volume labels are queried
using DosQueryFSInfo.