SetAttr
File management function.
The SetAttr function modifies file attributes.
Syntax
SetAttr(<filename>,<attribute_flags>)
or
ret=SetAttr(<filename>,<attribute_flags>)Parameters
<filename>, string, name of the file (optional specified with UNC) to modify. The name can include the wildcards * or ? in order to modify the attributes of multiple files in the same directory. The specified file must exist.
<attribute_flags>, integer which can be any of these values (or their sum):
0
No attribute
1
Read only
2
Hidden
4
System
32
Archive
Return value
Ret, numeric return code. When the attribute modification is successful, the function returns 0, otherwise use this return code for Error Handling.
Examples
SetAttr("c:\text\example.*", 0) ' Deletes all the attributes of the files "c:\text\example.* "
Res = Setattr(File$, a)