SetAttr Instruction
Syntax
SetAttr Name$, Attrib
Group
Description
Sets the attributes for file Name$. If the file does not exist, a runtime error occurs.
Sandbox
Sandbox mode blocks this instruction.
Parameters
| Parameters | Description |
|---|---|
| Name$ | The path and name of the file. You can use a path relative to the current directory. |
| Attrib | Sets the file attributes to this numeric value. |
Example
Sub Main Attrib = GetAttr("XXX") SetAttr "XXX",1 ' readonly Debug.Print GetAttr("XXX") ' 1 SetAttr "XXX",Attrib End Sub