ATTRIB
Home >>
MS-DOS Reference >>
Command Categories >>
File and Disk Management >>
ATTRIB
Description
Displays or modifies the attributes of a file
Command Syntax
ATTRIB [+r|-r] [+a|-a] [+s|-s] [+h|-h]
filename [/s]
- +r sets the read-only attribute
- -r removes the read-only attribute
- +a sets the archive attribute
- -a removes the archive attribute
- +s sets the system attribute
- -s removes the system attribute
- +h sets the hidden attribute
- -h removes the hidden attribute
- /s includes all files in every directory below
the one specified
Comments
The attributes ATTRIB can change and their
uses are as follows:
- Read only. Prevents the file being changed
or deleted
- Archive. Used mainly by backup utilities
- System. Up until DOS 6.22 it had little use
other than hiding files from directory listings. Now used in Windows 95
to denote system files
- Hidden. Prevents files being shown in directory
listings
There are other attributes which ATTRIB can't
change:
- Volume label. Used for the "Volume in drive
? is VOL_NAME" message. Also used by Windows 95 for long file names
- Directory. Used to denote directories.
Printed from the NukeSoft MS-DOS Reference. Copyright
© 1995 - 2006 Marcus Houlden