Attrib - Definition of Attrib Command

Definition of Attrib Command

There are four attributes in Windows files:

  • (r) Read-only file attribute
  • (a) Archive file attribute
  • (s) System file attribute
  • (h) Hidden file attribute

One or more of these attributes can be set or cleared in a single instance of the command for a specific file, file type, folder or and entire branch of the directory structure (a directory, including all sub-directories). There are three optional switches that can be applied at the end of the DOS command string, although not all switches are recognized for all versions of Windows. These switches are:

  • /S also apply changes to subdirectories of current directory
  • /D also apply changes to folder names (this only applies for Windows 2000 and Windows XP)
  • /L apply to symbolic link itself instead of the target of the symbolic link (introduced with Windows Vista and Windows Server 2008)

The general attrib command syntax is:

attrib filename

For example, to remove the read-only and hidden file attributes for all files in a directory tree:

attrib -r -h *.* /s /d

Note, the -s parameter will also remove the system attribute for files and should always be used with care and should not be used for genuine system files.

Read more about this topic:  Attrib

Famous quotes containing the words definition of, definition and/or command:

    Although there is no universal agreement as to a definition of life, its biological manifestations are generally considered to be organization, metabolism, growth, irritability, adaptation, and reproduction.
    The Columbia Encyclopedia, Fifth Edition, the first sentence of the article on “life” (based on wording in the First Edition, 1935)

    The definition of good prose is proper words in their proper places; of good verse, the most proper words in their proper places. The propriety is in either case relative. The words in prose ought to express the intended meaning, and no more; if they attract attention to themselves, it is, in general, a fault.
    Samuel Taylor Coleridge (1772–1834)

    It is manifest therefore that they who have sovereign power, are immediate rulers of the church under Christ, and all others but subordinate to them. If that were not, but kings should command one thing upon pain of death, and priests another upon pain of damnation, it would be impossible that peace and religion should stand together.
    Thomas Hobbes (1579–1688)