help.hlp (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
ATTRIB
Notes  Examples
────────────────────────────────────────────────────────────────────────────
 
                                   ATTRIB
 
Displays or changes file attributes.
 
This command displays, sets, or removes the Read-Only, Archive, System, and
Hidden attributes assigned to files or directories.
 
Syntax
 
    ATTRIB [+R|-R] [+A|-A] [+S|-S] [+H|-H][[drive:][path]filename] [/S]
 
To display all attributes of all files in the current directory, use the
following syntax:
 
    ATTRIB
 
Parameter
 
[drive:][path]filename
    Specifies the location and name of the file(s) you want to process.
 
Switches
 
+R
    Sets the Read-Only file attribute.
 
-R
    Clears the Read-Only file attribute.
 
+A
    Sets the Archive file attribute.
 
-A
    Clears the Archive file attribute.
 
+S
    Sets the file as a System file.
 
-S
    Clears the System file attribute.
 
+H
    Sets the file as a Hidden file.
 
-H
    Clears the Hidden file attribute.
 
/S
    Processes files in the current directory and all of its subdirectories.
 
Related Command
 
For more information about copying files and directories with different
attributes, see the <XCOPY> command.
 
                                      ♦