Attrib Command Syntax

December 2016




Whats with the x and a options?

Attrib Command Syntax:

attrib [+r|-r] [+s|-s] [+h|-h] [+c|-c] [filename]
  • +r = This assigns the read-only file attribute to the file or directory.
  • -r = This removes the read-only attribute.
  • +s = This assigns the system file attribute to the file or directory.
  • -s = This removes the system attribute.
  • +h = This assigns the hidden file attribute to the file or directory.
  • -h = This removes the hidden attribute.
  • +c = This assigns the compressed file attribute to the file or directory.
  • -c = This removes the compressed attribute.
  • filename = This is the file or directory that you are wanting to change the attributes of.


Thanks to xpcman for this tip on the forum.

Related :

This document entitled « Attrib Command Syntax » from CCM (ccm.net) is made available under the Creative Commons license. You can copy, modify copies of this page, under the conditions stipulated by the license, as this note appears clearly.