Category : Assembly Language Source Code
Archive   : DOCFILES.ZIP
Filename : ATTR.DOC

Output of file : ATTR.DOC contained in archive : DOCFILES.ZIP

ATTR (Attribute) Charles Petzold
Command PC Magazine Vol 5, No 11
Copyright 1986 Ziff-Davis Publishing Company

Purpose: ATTR.COM permits display and modification of
the archive, system, hidden, and read-only
file attributes.

Format: ATTR
ATTR *.*
ATTR [+A|-A] [+S|-S] [+H|-H] [+R|-R]

Remarks: Entering ATTR without any parameters, as in
the first format shown above, produces a help
display (essentially identical to the third
form above) that shows which file attributes
can be changed.

ATTR.COM permits the use of the global ? and
* characters (as in the second format above).
Entering ATTR filename displays a specific
file's attributes. For example,


returns the display


showing that the Archive, System, Hidden, and
Read-Only bits of the attribute byte are set
for this file.

When wildcards are used to list the
attributes of all the files in a directory,
subdirectory names are shown as Dir (between
the Arc and Sys in the example above).
Unlike the DOS DIR command, ATTR lists hidden
files, whether sought by specified filename
or through a *.* listing. However, ATTR does
not show Volume names or the dot and double-
dot entries in subdirectories.

The syntax for changing file attributes is
indicated in the third format above. After
typing ATTR (and a space) you simply precede
the file specification with a plus or minus
sign, followed by the letter A (Archive), S
(System), H (Hidden), or R (Read-Only). A
plus sign turns on the specified attribute; a
minus sign turns it off. More than one
attribute can be changed at once, and the
attribute-designating letters may be entered
in any order and in upper- or lowercase. No
space may be used between the plus or minus
and the letter that follows it, however.

Example: To convert the file 85TAX.WKS to hidden and
read-only, you would enter


Since DOS itself normally sets the Archive
bit, entering


would produce the display

85TAX.WKS Arc Hid R-O

Since the Hidden attribute has been set,
however, the DIR command will produce the
message, "File not found." And since the
Read-Only flag has also been set, a DEL
command will produce the message, "Access


1. Requires DOS 2.0 or later.

  3 Responses to “Category : Assembly Language Source Code
Archive   : DOCFILES.ZIP
Filename : ATTR.DOC

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: