Skip to main content

Displays or changes file and directory attributes.

:: To display the attributes of the files in the current directory:
attrib

:: To display the attributes of the files in the current directory and sub-directories:
attrib /S

:: To display the attributes of the files and folders in the current directory and sub-directories:
attrib /S /D

:: To add the read-only attribute to a file:
attrib +R document.txt

:: To remove the system and hidden attributes of a file:
attrib -S -H document.txt

:: To add the hidden attribute to a folder:
attrib +H path\to\folder