2017-11-13 05:40:05 +00:00
|
|
|
# attrib
|
|
|
|
|
|
|
|
> Displays or changes file and directory attributes.
|
2019-08-22 13:37:57 +01:00
|
|
|
> More information: <https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/attrib>.
|
2017-11-13 05:40:05 +00:00
|
|
|
|
|
|
|
- Display the attributes of the files in the current directory:
|
|
|
|
|
|
|
|
`attrib`
|
|
|
|
|
|
|
|
- Display the attributes of the files in the current directory and sub-directories:
|
|
|
|
|
|
|
|
`attrib /S`
|
|
|
|
|
2019-02-11 18:00:49 +00:00
|
|
|
- Display the attributes of the files and directories in the current directory and sub-directories:
|
2017-11-13 05:40:05 +00:00
|
|
|
|
|
|
|
`attrib /S /D`
|
|
|
|
|
|
|
|
- Add the read-only attribute to a file:
|
|
|
|
|
|
|
|
`attrib +R {{document.txt}}`
|
|
|
|
|
|
|
|
- Remove the system and hidden attributes of a file:
|
|
|
|
|
|
|
|
`attrib -S -H {{document.txt}}`
|
|
|
|
|
2019-02-11 18:00:49 +00:00
|
|
|
- Add the hidden attribute to a directory:
|
2017-11-13 05:40:05 +00:00
|
|
|
|
2019-02-11 18:00:49 +00:00
|
|
|
`attrib +H {{path\to\directory}}`
|