attrib Command Examples

Display or change attributes of files or directories. More information: https://learn.microsoft.com/windows-server/administration/windows-commands/attrib.

attrib

attrib {{path\to\directory}}

attrib /d

attrib /s

attrib +{{r|a|s|h|i}} {{path\to\file_or_directory1 path\to\file_or_directory2 ...}}

attrib -{{r|a|s|h|i}} {{path\to\file_or_directory1 path\to\file_or_directory2 ...}}