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.

How to change the file's attributes using the Attrib command Picture 1

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 ).

How to change the file's attributes using the Attrib command Picture 2

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:

How to change the file's attributes using the Attrib command Picture 3

* To cancel an existing property of the file, enter the following command and press Enter :

attrib -

For example, cancel the Hidden property :

How to change the file's attributes using the Attrib command Picture 4

* The attrib command can also change multiple properties at once for a file.

For example, cancel both Hidden and Read-only properties simultaneously :

How to change the file's attributes using the Attrib command Picture 5

* You can also use the attrib command to see what properties a file has:

attrib

The symbols in the resulting line indicate the properties of the file.

How to change the file's attributes using the Attrib command Picture 6

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!

5 ★ | 1 Vote

May be interested

  • How to Play Wifi on Windows 8, share Wifi on Windows 8 without softwarePhoto of How to Play Wifi on Windows 8, share Wifi on Windows 8 without software
    everyone knows, a smartphone can become a wifi hotspot for any device around it, and so can a laptop. from a networked windows 8 laptop, you can completely broadcast wifi to share the network with other devices. the following article will guide you how to share wifi on windows 8 without software.
  • What is Windows Explorer? How to open Windows ExplorerPhoto of What is Windows Explorer? How to open Windows Explorer
    when we use a windows computer, there are many different terms. one of the most common terms used on windows is windows explorer / file explorer. so what is the meaning of windows explorer / file explorer and how they work on windows, in this article we will answer together.
  • What is thread? Differences between Process and ThreadPhoto of What is thread? Differences between Process and Thread
    thread and process, these are terms that you will hear a lot if you study information technology, and need to understand when going to work. however, the definition and the difference between them is not well known, because they may not be in the knowledge taught by the school.
  • What is a temporary file? Does deleting the Temp file affect the computer?Photo of What is a temporary file? Does deleting the Temp file affect the computer?
    have you ever heard of the phrase temporary file? it sounds irrelevant, but it is a directory that every computer has. so what are their meanings and uses? let's find out more with tipsmake.com through this article! ng!
  • What is the OS (Operating System)? Overview of the operating system (OS)Photo of What is the OS (Operating System)? Overview of the operating system (OS)
    computers, tablets, smartphones, or even modern tvs all have operating systems (os) inside. however, there are many people who still use it every day but never know what the operating system is. the following article will introduce an overview of the operating system to help you better understand.
  • What is a DMG file? How to open DMG files on WindowsPhoto of What is a DMG file? How to open DMG files on Windows
    what is a dmg file? how to open dmg files on windows. if you are already a macos user from apple, then the dmg file is too familiar when you install applications on your computer. dmg files are constantly used on macos when you download applications to your computer, but on windows, dmg files are rare like gold.