Description: This statement sets the attributes of the specified file.
Returns: Nothing
Usage: Script
Format: SetFileAttribs(FileName, Attributes, Mode)
Parameters: FileName { text } { required } { no default: }
Any text expression giving the name of the file.
Attributes { numeric } { required } { default: 0 }
Any numeric expression which designates the attributes to be set. This parameter is formed by adding together numbers from the following table:
|
Value |
Bit No |
Attribute |
|
0 |
- |
Normal |
|
1 |
0 |
Read only |
|
2 |
1 |
Hidden |
|
4 |
2 |
System |
|
8 |
3 |
Archive |
Optionally if mode is 1, may be a timestamp.
Mode { numeric } { optional } { no default: }
Controls the action of this function. If invalid or set to 0, the file attributes will be set as noted above. If set to 1, then this function will set the file’s date.
Comments: Four file attributes may be set by this statement; all attributes will be changed at once.
Example:
If Watch(0, newFile);
[
SetFileAttribs(Concat(MyPath, newFile), 9);
]
The above statement will cause file newFile to have its ReadOnly and Archive bit set every time its name changes.
See Also: