home *** CD-ROM | disk | FTP | other *** search
/ Hall of Fame / HallofFameCDROM.cdr / pcmag / attr.lzh / ATTR.DOC < prev   
Text File  |  1988-11-24  |  4KB  |  84 lines

  1.           ATTR (Attribute)                        Charles Petzold
  2.           ______________________________________________________
  3.  
  4.           Purpose:  ATTR.COM permits display and modification of
  5.                     the archive, system, hidden, and read-only
  6.                     file attributes.
  7.  
  8.           Format:   ATTR
  9.                       or
  10.                     ATTR *.*
  11.                       or
  12.                     ATTR [+A|-A] [+S|-S] [+H|-H] [+R|-R]
  13.                     [d:][path]filename[.ext]
  14.  
  15.           Remarks:  Entering ATTR without any parameters, as in
  16.                     the first format shown above, produces a help
  17.                     display (essentially identical to the third
  18.                     form above) that shows which file attributes
  19.                     can be changed.
  20.  
  21.                     ATTR.COM permits the use of the global ? and
  22.                     * characters (as in the second format above).
  23.                     Entering ATTR filename displays a specific
  24.                     file's attributes.  For example,
  25.  
  26.                          ATTR IBMBIO.COM
  27.  
  28.                     returns the display
  29.  
  30.                          IBMBIO.COM    Arc     Sys Hid R-O
  31.  
  32.                     showing that the Archive, System, Hidden, and
  33.                     Read-Only bits of the attribute byte are set
  34.                     for this file.
  35.  
  36.                     When wildcards are used to list the
  37.                     attributes of all the files in a directory,
  38.                     subdirectory names are shown as Dir (between
  39.                     the Arc and Sys in the example above).
  40.                     Unlike the DOS DIR command, ATTR lists hidden
  41.                     files, whether sought by specified filename
  42.                     or through a *.* listing.  However, ATTR does
  43.                     not show Volume names or the dot and double-
  44.                     dot entries in subdirectories.
  45.  
  46.                     The syntax for changing file attributes is
  47.                     indicated in the third format above.  After
  48.                     typing ATTR (and a space) you simply precede
  49.                     the file specification with a plus or minus
  50.                     sign, followed by the letter A (Archive), S
  51.                     (System), H (Hidden), or R (Read-Only).  A
  52.                     plus sign turns on the specified attribute; a
  53.                     minus sign turns it off.  More than one
  54.                     attribute can be changed at once, and the
  55.                     attribute-designating letters may be entered
  56.                     in any order and in upper- or lowercase.  No
  57.                     space may be used between the plus or minus
  58.                     and the letter that follows it, however.
  59.  
  60.           Example:  To convert the file 85TAX.WKS to hidden and
  61.                     read-only, you would enter
  62.  
  63.                     ATTR +H +R 85TAX.WKS
  64.  
  65.                     Since DOS itself normally sets the Archive
  66.                     bit, entering
  67.  
  68.                           ATTR 85TAX.WKS
  69.  
  70.                     would produce the display
  71.  
  72.                          85TAX.WKS     Arc         Hid R-O
  73.  
  74.                     Since the Hidden attribute has been set,
  75.                     however, the  DIR command will produce the
  76.                     message, "File not found."  And since the
  77.                     Read-Only flag has also been set, a DEL
  78.                     command will produce the message, "Access
  79.                     denied."
  80.  
  81.                     Notes:
  82.  
  83.                     1.   Requires DOS 2.0 or later.
  84.