Letters used when changing attributes
When attrib.exe
is invoked to change an attribute, the attribute being modfified is denoted according to the following table.
To set an attribute, the letter needs to be prended by a plus symbol, to remove it, by a minus symbol.
R | Read-only file attribute. |
A | Archive file attribute. |
S | System file attribute. |
H | Hidden file attribute. |
O | Offline attribute. |
I | Not content indexed file attribute. |
X | No scrub file attribute. |
V | Integrity attribute. |
P | Pinned attribute. |
U | Unpinned attribute. |
B | SMR Blob attribute. |
Examples
The following command hides the file xyz.txt
:
C:\users\rene> attrib +h xyz.txt
The following command makes it visible again:
C:\users\rene> attrib -h xyz.txt
Show attributes of files and directories
attrib *
shows all files in the current directory along with their attributes.
In order to also see the attributes of directories, the /d
option can be used:
C:\Users\rene> attrib /d