fileattrib
Set or get attributes of file or folder
Syntax
Description
fileattrib
lists the attribute values for the current folder. The values are listed using this structure:
Name |
archive |
system |
hidden |
directory |
UserRead |
UserWrite |
UserExecute |
GroupRead |
GroupWrite |
GroupExecute |
OtherRead |
OtherWrite |
OtherExecute |
The first field,Name
, displays the file or folder name. The remaining fields display a value of0
if the attribute is off,1
if the attribute is on, andNaN
if the attribute does not apply.
fileattrib
is similar to the DOSattrib
command, or the UNIX®chmod
command.
Note
In Windows®, setting the write access attribute ('w'
) to read-only does not necessarily prevent write access. Therefore, the value forUserWrite
may differ from what is expected.