Printer Friendly
The Free Dictionary
982,869,279 visitors served.
?
Dictionary/
thesaurus
Medical
dictionary
Legal
dictionary
Financial
dictionary
Acronyms
 
Idioms
Encyclopedia
Wikipedia
encyclopedia
?

DOS Attrib

    0.01 sec.

An external command that displays and changes file attributes, which are settings in every DOS file. The file attributes are bits that are turned on (set to 1) or turned off (set to 0).

             FILE ATTRIBUTES

             A - Archive
             H - Hidden file
             R - Read only
             S - System file


To display the current attributes in all files in the current directory, type:
      attrib *.*     files only
      attrib *.* /s  files & subdirectories


READ ONLY STATUS
When a file is read-only, it cannot be changed or deleted. To set and reset VITAL.TXT, type:
   attrib vital.txt +r   set to read-only
   attrib vital.txt -r   reset to read/write


ARCHIVE ATTRIBUTE
As of DOS 3.3, all files are set to archive status (archive bit on), which assists in making backups. When files are copied by the Xcopy or Backup commands, the archive bit is turned off (0) on the original file and not turned on again (1) until the file has been modified by some application. The following example removes and restores the archive status in XYZ.TXT.
   attrib xyz.txt -a   turn off
   attrib xyz.txt +a   turn back on


To back up only modified files (archive bit on), use the /m switch with the Xcopy and Backup commands. After copying, the archive bit on the original file is turned off (set to zero). For example, to Xcopy only modified files (archive bit on) to the B drive, type:
           xcopy *.* b: /m


For more archive examples, see DOS Xcopy and DOS Backup/Restore.

SYSTEM AND HIDDEN ATTRIBUTE (as of DOS 5)
These attributes are assigned to important DOS files and other files that your applications may generate. As a rule, you should not tamper with them unless you know what you are doing. Prior to DOS 5, you needed a third-party utility to do this. As of DOS 5, you can reset these attributes in most, but not all files, in which case you may still need a third-party program.
   attrib xyz +s   make XYZ a system file
   attrib xyz -s   clear system file status

   attrib xyz +h   make XYZ a hidden file
   attrib xyz -h   clear hidden status


?Page tools
Printer friendly
Cite / link
Email
Feedback
? Mentioned in
 
Encyclopedia browser? ? Full browser
 
 
Encyclopedia
?

Disclaimer | Privacy policy | Feedback | Copyright © 2008 Farlex, Inc.
All content on this website, including dictionary, thesaurus, literature, geography, and other reference data is for informational purposes only. This information should not be considered complete, up to date, and is not intended to be used in place of a visit, consultation, or advice of a legal, medical, or any other professional. Terms of Use.