WELCOME to Free Self Help Quick Facts
No Nonsense FREE Computer Answers from people just like you, in plain English

Search Site

 

 

ATTRIB

Displays or changes file attributes.

ATTRIB [+R | -R] [+A | -A ] [+S | -S] [+H | -H] [drive:][path][filename]
[/S [/D]]

+ Sets an attribute.
- Clears an attribute.
R Read-only file attribute.
A Archive file attribute.
S System file attribute.
H Hidden file attribute.
[drive:][path][filename]
Specifies a file or files for attrib to process.
/S Processes matching files in the current folder
and all subfolders.
/D Processes folders as well.

 

Example:

Set the read-only attribute for to file1.txt:
File1.txt attrib +r c:File1.txt, now DOS will not allow you to delete or modify it (until the attribute is removed).

To set the archive attribute for the file file1.txt which is in the \DIR1 directory on drive C, enter

attrib +a C:\DIR1\file1.txt