Forrest logo
back to the attrib tool

attrib:tldr:44c64

attrib: Remove a specific attribute of files or directories.
$ attrib -${select} ${path\to\file_or_directory1 path\to\file_or_directory2 ---}
try on your machine

The command "attrib" is used to change or display the attributes of files or directories in Windows operating systems.

The "-${select}" part of the command (-R, -A, -H, -S) is an optional flag that allows you to select specific attributes to apply to the specified files or directories:

  • "R" stands for Read-only attribute.
  • "A" stands for Archive attribute.
  • "H" stands for Hidden attribute.
  • "S" stands for System attribute.

You can choose any combination of these attributes or use them individually. For example, if you want to make a file read-only and hidden, you would use "-RH" as the "${select}" parameter.

The "${path\to\file_or_directory1 path\to\file_or_directory2 ---}" part of the command refers to the path of the files or directories you want to modify or view attributes for. You can specify the path to a single file or directory, or multiple files or directories separated by a space. You can also use wildcards (*) to specify multiple files or directories that match a certain pattern.

For example, if you want to make a file named "example.txt" hidden, you would use the command "attrib +H path\to\example.txt". If you want to view the attributes of a directory named "folder", you would use the command "attrib path\to\folder".

Note: The "+" or "-" sign before the attribute in the path indicates whether you want to add or remove that attribute. "+" adds the attribute and "-" removes it.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the attrib tool