Sets attribute information for a file.
SetAttr pathname, attributes |
The SetAttr statement syntax has these named arguments:
Part | Description |
pathname | Required. String expression that specifies a file name - may include directory or folder, and drive. |
attributes | Required. Constant or numeric expression, setting file attributes. |
Below are possible values of the attributes argument:
Constant | Value | Description |
cdbNormal | 0 | Normal. |
cdbReadOnly | 1 | Read Only. |
cdbHidden | 2 | Hidden. |
cdbSystem | 4 | System (only in Microsoft Windows) |
cdbArchive | 32 | File was changed since last backup (only in Microsoft Windows) |
cdbAlias | 64 |
The filename is an alias (only on the Macintosh). |
In this example the SetAttr statement is used to set attribute information for a file.
' Sets the Hidden attribute. SetAttr "TESTFILE", cdbHidden ' Sets Hidden and Read Only attributes. SetAttr "TESTFILE", cdbHidden + cdbReadOnly |
See Also |
FileAttr Function, GetAttr Function |