Tag Archives: Attrib

Updating Attributes via command line

http://www.howtogeek.com/205910/how-to-change-file-attributes-with-attrib-from-the-windows-command-prompt/

.

What Attributes Can You Use?

Now that you have your elevated command prompt window open, you will need to know what types of attributes you can edit using the “attrib” tool. There are two main types of attributes, “basic” and “extended.”

Basic Attribute Switches (R, H, A, S)

  1. R – This command will assign the “Read-Only” attribute to your selected files or folders.
  2. H – This command will assign the “Hidden” attribute to your selected files or folders.
  3. A – This command will prepare your selected files or folders for “Archiving.”
  4. S – This command will change your selected files or folders by assigning the “System” attribute.

“Attrib” Syntax

You will need to know the proper syntax to use for the “attrib” tool before you get started.

ATTRIB [+ attribute | - attribute] [pathname] [/S [/D]]

In this syntax, you will need to know what the different switches and parameters represent.

  1. The + and – indicate whether you will activate or deactivate the attribute specified.
  2. The attributes you can use are those explained above.
  3. The “/S” signifies that you want to search the entire path specified including subfolders for a particular file.
  4. The “/D” signifies that you want to include any process folders as well.
  5. The pathname indicates the location of your target folder or file. The proper syntax for path files is shown below.
Drive and/or filename - C:\*.* OR C:\Users\Owner\Desktop\samplefile.txt

If you decide not to specify any of the attributes listed above, the files or folders will revert to their current attribute settings.