attrib is a command, in MS-DOS, OS/2 and Microsoft Windows. The function of attrib is to set and remove file attributes (read-only, archive, system and hidden). These attributes are used by a wide variety software to protect and classify files.

Many users regularly encounter the read-only attribute, which will prevent most software from allowing the user to overwrite or append to a file. Software can be designed to override this option, often after receiving confirmation from the user. The archive attribute is used by various backup and file copy programs as a hint as to whether a file needs to be backed up. The hidden attribute makes affected files invisible in many programs, although a variety of software, especially software designed for listing, viewing, and searching files, allows hidden files to be made visible, often with a notation that they have been designated as hidden. The system attribute is used to designate certain operating system files and affects the operation of most software less than the other attributes.


In certain versions, when both the s and h attributes are set, they can only be removed at the same time. To remove only one, they must both be removed at the same time, and then the desired attribute must be set.

Undocumented features

If a comma is typed directly after the command's name (for example, attrib, *.txt), all attributes will be removed from the targeted files (in this case, all .txt files in the folder). In most versions, if a target isn't specified, then all attributes will be removed from the folder currently being browsed in DOS.


See also

Search another word or see attribon Dictionary | Thesaurus |Spanish
Copyright © 2015, LLC. All rights reserved.
  • Please Login or Sign Up to use the Recent Searches feature