How to use Attrib Command

ATTRIB


Purpose:Displays or changes file attributes.

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

         +   Sets an attribute.
          -   Clears an attribute.
         R   Read-only file attribute.
         A   Archive file attribute.
         S   System file attribute.
         H   Hidden file attribute.
          I   Not content indexed file attribute.
         X   No scrub file attribute.
         V   Integrity 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.
         /L  Work on the attributes of the Symbolic Link versus the target of the Symbolic Link

Example:

  1. Type Attrib +R <file name> to make your document read only.
  2. Type Attrib -R  <file name> to undo read only of the document.
  3. Type Attrib +H <file name> to hide your document.
  4. Type Attrib -H <file name> to unhide your document.
  5. Type Attrib +R +H +S <file name> to mark read only and hide your document 



Comments

Popular posts from this blog

How to use DIR Command

How to Write Your First Batch Script Progarm

How to Set Date Using CMD