OverviewExamples
File.SetAttributes ( |
Sets the attributes of a file.
(string) The path to the file.
(table) A table containing the file attributes that you want to modify, indexed by name. In the table, a value of true turns an attribute on, and a value of false turns the attribute off.
The following attributes can be set or unset in the table:
KEY |
TYPE |
DESCRIPTION |
Archived |
boolean |
Sets or unsets the archive file attribute. |
ReadOnly |
boolean |
Sets or unsets the read-only file attribute. |
Compressed |
boolean |
Sets or unsets the compressed file attribute. |
System |
boolean |
Sets or unsets the system file attribute. |
Hidden |
boolean |
Sets or unsets the hidden file attribute. |
Temporary |
boolean |
Sets or unsets the temporary file attribute. |
Normal |
boolean |
When used alone (when it is the only attribute in the table), setting Normal to true will unset all of the other attributes. Otherwise, it is simply ignored. |
Note: If there are any other keys in the table, they will be ignored.
Nothing. You can use Application.GetLastError to determine whether this action failed, and why.
See also: Related Actions