Name
Attributes (File Object, Folder Object) —
Obj
.
Attributes [ =
intNewAttributes
]
Synopsis
An integer containing a combination of values representing various file system attributes. This property is read-only or read/write depending on the specific file attribute in question.
The following table lists the values that the Attributes property can
contain. To determine whether a File or Folder object has a
particular value, use the bitwise And operator to
compare the Attributes property value and the specific constant in
which you're interested. If the result is
True, then that specific attribute is
True. See the following examples.
|
Attributes Constant |
Value |
Description |
|---|---|---|
Normal |
0 |
No attributes are set. |
ReadOnly |
1 |
Read-only. This attribute is read/write. |
Hidden |
2 |
Hidden. This attribute is read/write. |
System |
4 |
System file. This attribute is valid only for File objects and is read/write. |
Volume |
8 |
The drive's volume label. This attribute is read-only. |
Directory |
16 |
Directory. This attribute is read-only. |
Archive |
32 |
Archived. This attribute is read/write. |
Alias |
64 |
A link or shortcut for another file. This attribute is valid only for File objects and is read-only. |
Compressed |
128 |
Compressed. This attribute is valid only for File objects and is read-only. |
Parameters
-
intNewAttributes An integer containing the sum of a file's or folder's attributes. For example, if you wanted to set the Archived and Hidden attributes to
True,intNewAttributeswould have a value ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access