How to change the file's attributes using the Attrib command
In Windows, file attributes are settings associated with files on a computer that grant or deny certain rights to users or operating systems associated with accessing that file. The following article will show you how to change the properties of any file using attrib command in Command Prompt.
Types of file attributes
First, we need to know what kind of attributes a computer file can carry. With Windows operating systems, there are four traditional types of file attributes:
- Read-only : Can read, but cannot change or delete;
- Hidden : By default will not be displayed in the list of files located in the directory;
- Archive : Used to selectively back up or copy files;
- System : Mark important system files, necessary to the computer operating properly (by default will be hidden even if you unhide the files Hidden ).
In the new versions of Windows, many types of file attributes have been updated, such as Encrypted , Not Content-Indexed , Offline , etc. However, for general users, most of those attribute types are never used. use in this article I will not mention.
Instructions to change the properties of the file with the attrib command
Each type of file attribute has a unique symbol. Before using the command to change file attributes, you need to know the symbol that corresponds to each attribute type:
- Read-only with symbol R;
- Hidden with symbol H;
- Archive with the symbol A;
- System has the symbol S.
Then you proceed to change the properties of the file according to the following steps:
Step 1: Open Command Prompt (can use the Search feature , search by keyword "cmd", right-click on the Command Prompt result and select Run as administrator ).
Step 2: Use attrib command to change the properties of the file.
* To add an additional attribute to the file, enter the following command and press Enter :
attrib +Inside:
- Attribute symbol : A symbol corresponding to the attribute you want to add to the file;
- Path of the file : The full path to that file.
For example, add the Hidden attribute as follows:
* To cancel an existing property of the file, enter the following command and press Enter :
attrib -For example, cancel the Hidden property :
* The attrib command can also change multiple properties at once for a file.
For example, cancel both Hidden and Read-only properties simultaneously :
* You can also use the attrib command to see what properties a file has:
attribThe symbols in the resulting line indicate the properties of the file.
Through the article above, I showed you how to change the properties of the file with the attrib command . Hope that the information just shared above will be helpful for you!
You should read it
- How to Change File Dates
- Attributes in HTML
- Change logon command in Windows
- Change all file extensions in a Folder with the CMD command
- Change command in Windows
- How to Locate Viruses Using the Attrib Command
- The Fsutil file in Windows
- How to change the folder in Command Prompt on Windows 10
- Attribute in C #
- Ftype command in Windows
- Change port command in Windows
- The command changes user in Windows
Maybe you are interested
9 ways to fix the error of not being able to save files as JPEG or PNG in Photoshop
Download standard and beautiful Word file experience initiative cover template
How to use the file search command on Windows, find saved files
How to split sheet into multiple separate Excel files
How to merge PDF files, merge and join multiple PDF files into a single file
How to clean up iPhone junk, delete junk files to free up iPhone storage