attrib
Windows CMD · Files · available in the simulator
What it does
Displays or changes file and directory attributes. Attributes: a (archive), r (read-only), h (hidden), s (system).
Syntax
attrib [+r|-r] [+a|-a] [+s|-s] [+h|-h] [archivo] [/s] [/d]
Options and parameters
+r/-rsets/clears read-only attribute
+h/-hsets/clears hidden attribute
+s/-ssets/clears system attribute
+a/-asets/clears archive attribute
/sapplies to subdirectories
/dapplies to directories as well
+RSets the read-only attribute.
attrib +r archivo.txt-RClears the read-only attribute.
+ASets the archive file attribute.
-AClears the archive file attribute.
+SSets the system file attribute.
-SClears the system file attribute.
+HSets the hidden file attribute.
attrib +h +s archivo.txt-HClears the hidden file attribute.
/SApplies the change to matching files in the current directory and all subdirectories.
/DApplies the change to directories as well.
/LApplies the operation to the symbolic link instead of its target.
Usage examples
attrib +r f1attrib +h +s f2attrib +r *.txt /sattrib /dattrib archivo.txtattrib +h +s archivo.txtattrib +r archivo.txt