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
,intNewAttributes
would have a value ...
Get ASP in a Nutshell, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.