What Is the Attrib Command?:
An attrib command is also available from the Command Prompt.
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.
Attrib Command Examples:
attrib +r c:\windows\system\secretfolder
In the above example, the attrib command is used to turn on the read only attribute, using the +r option, for the secretfolder directory located in c:\windows\system.
attrib -h c:\config.sys
In this example, the config.sys file located in the root directory of the c: drive has its hidden file attribute cleared by use of the -h option.
Attrib Command Availability:
The attrib command is available from within the Recovery Console in Windows 2000 and Windows XP.
Attrib Related Commands:
The attrib command is often used with many of the Recovery Console commands.