High Quality Content by WIKIPEDIA articles! attrib is a command, in 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 of software programs to protect and classify files.