Attribute Utility
attrib
- C:\Windows\system32\attrib.exe /?
Output:
Displays or changes file attributes.
ATTRIB [+R | -R] [+A | -A] [+S | -S] [+H | -H] [+O | -O] [+I | -I] [+X | -X] [+P | -P] [+U | -U]
[drive:][path][filename] [/S [/D]] [/L]
+ Sets an attribute.
- Clears an attribute.
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.
[drive:][path][filename]
Specifies a file or files for attrib to process.
/S Processes matching files in the current folder
and all subfolders.
/D Processes folders as well.
/L Work on the attributes of the Symbolic Link versus
the target of the Symbolic Link
Return Code: 0
example
c:\example>dir /b
1Read-only file.txt
2Archive file.txt
3System file.txt
4Hidden file.txt
5Offline file.txt
6Not content indexed file.txt
7No scrub file.txt
8Pinned file.txt
9Unpinned file.txt
example.bat
c:\example>attrib
A C:\example\1Read-only file.txt
A C:\example\2Archive file.txt
A C:\example\3System file.txt
A C:\example\4Hidden file.txt
A C:\example\5Offline file.txt
A C:\example\6Not content indexed file.txt
A C:\example\7No scrub file.txt
A C:\example\8Pinned file.txt
A C:\example\9Unpinned file.txt
A C:\example\example.bat
c:\example>attrib +S "3System file.txt"
c:\example>attrib +H "4Hidden file.txt"
c:\example>dir /b
1Read-only file.txt
2Archive file.txt
5Offline file.txt
6Not content indexed file.txt
7No scrub file.txt
8Pinned file.txt
9Unpinned file.txt
example.bat
c:\example>attrib +R "1Read-only file.txt"
c:\example>attrib +A "2Archive file.txt"
c:\example>attrib +O "5Offline file.txt"
c:\example>attrib +I "6Not content indexed file.txt"
c:\example>attrib +X "7No scrub file.txt"
c:\example>attrib +P "8Pinned file.txt"
c:\example>attrib +U "9Unpinned file.txt"
c:\example>attrib
A R C:\example\1Read-only file.txt
A C:\example\2Archive file.txt
A S C:\example\3System file.txt
A H C:\example\4Hidden file.txt
A O C:\example\5Offline file.txt
A I C:\example\6Not content indexed file.txt
A X C:\example\7No scrub file.txt
A P C:\example\8Pinned file.txt
A U C:\example\9Unpinned file.txt
A C:\example\example.bat
c:\example>dir /b
1Read-only file.txt
2Archive file.txt
5Offline file.txt
6Not content indexed file.txt
7No scrub file.txt
8Pinned file.txt
9Unpinned file.txt
example.bat
c:\example>del *txt
c:\example\1Read-only file.txt
Access is denied.
c:\example>dir /b
1Read-only file.txt
example.bat
c:\example>attrib -R "1Read-only file.txt"
c:\example>attrib
A C:\example\1Read-only file.txt
A S C:\example\3System file.txt
A H C:\example\4Hidden file.txt
A C:\example\example.bat
c:\example>dir /b /a
1Read-only file.txt
3System file.txt
4Hidden file.txt
example.bat
c:\example>del /a *txt
c:\example>dir /b /a
example.bat
Symbolic Link
Administrator
C:\Windows\system32\attrib.exe
c:\>ver
Microsoft Windows [Version 10.0.19045.2075]
| File | Info |
|---|---|
| File Size | 23040bytes |
| Creation Time | 2019/12/07 18:09:13 |
| LastWrite Time | 2019/12/07 18:09:13 |
| ProductVersion | 10.0.19041.1 |
| FileVersion | 10.0.19041.1 (WinBuild.160101.0800) |
| Hash | Value |
|---|---|
| MD5 | 5037d8e6670ef1d89fb6ad435f12a9fd |
| SHA1 | b8337fa20077a2c6db7d01ccc18e328a91255745 |
| SHA224 | a8303373e882afdbff54e832dbf2c77713cb7c5a75839817875b8b2c |
| SHA256 | 1043111ff07814b0d3439561b4cee5d7ec1799a7a0a419949fee707666f6dded |
| SHA384 | eb296f04b98e4ade3517ddcb6b6efa60bd2b4d2b636a62383e25922c470be823ca67b876223d9b1532cb0be227aabed2 |
| SHA512 | 5bf517a500d25bfa57445e51750a51cebfc3c325bbcdc5d7ee0e9c3109f5f0dc6259fde8417a24afc1c608c44d090be3630663e0b1536e6fb30e5eafd4621f4f |