How to Change File Attributes with Attrib

Attrib is a command used to change the various characteristics or attributes of a file or directory in DOS, OS/2 and Microsoft Windows. It generally displays, sets or removes the read-only, archive, system, and hidden attributes of a file or directory. So here is a tutorial to Save, Hide, Archive files using Attrib command.

Basic Attributes: In a command prompt window, the basic attributes used for editing a group of selected files or folders using attrib tool are

  • R- Assigns “Read-Only” attribute to prevent software programs from saving changes to a file.
  • H- Assigns “Hidden” attribute to prevent the view of a file under normal conditions.
  • A- “Archive” attribute allows the backup programs to know what files to back up.
  • S- This changes the selected files to “System” attribute so that it is exclusively used by the operating system

Syntax:

attrib [{+r|-r}] [{+a|-a}] [{+s|-s}] [{+h|-h}] [[Drive:][Path] FileName] [/s[/d]]

read more

Continue reading →