This command will display or change, or remove the file attributes like 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]
Where [+R | -R] [+A | -A] [+S | -S] [+H | -H] are the 4 flags that can be set by ATTRIB: which stand for
R - Read Only
A - Archive
S - System
H - Hidden
These are turned on by the + (plus sign) and off by - (minus sign)
Typing ATTRIB on the command line will display the attributes of all the files in the current directory. Even the hidden files are displayed. ATTRIB displays information that is not revealed by DIR. Typing ATTRIB and a filename will display the attributes of that file.
Example: ATTRIB C:\TEST.BAT
ATTRIB +H C:\TEST. TXT will turn the hidden flag on.
ATTRIB -H C:\TEST. TXT will turn the hidden flag off.












