29 C
Texas

How to change items attributes in Windows 10

Hello! Nowadays, we store a lot of information in our computers. Indeed, we are continuously working with different documents, files, folders. Therefore, for many people, their use is indispensable. Of course, the pc is usually their main storage system. For this reason, it is essential to know how to manage all permissions and settings. You have probably wondered what is the attribute that allows a file to be read only and not modified. In fact, this allows you to protect the information. Then changing file attributes will be the solution you are looking for. Read on to learn how to change item attributes in Windows 10

Item attribute types in Windows 10

Files in a Windows environment have a number of attributes or properties that make them unique. Indeed, these attributes may or may not grant certain permissions to users. Some of these attributes are managed by the operating system. On the other hand, others can be managed by the application developer itself. In addition, some files may present reading problems. Generally, they will be related to having to change attributes of a file. In Windows systems, we manage different types of attributes. These are read, file, system and hidden. In addition, each of them has a role within the operating system. Let’s look at them in depth.

  • Read-only: This permission gives the ability to read a file, but it is not possible to write anything to the file or modify any of its contents.
  • File: This attribute tells the Windows Backup function to back up the selected file.
  • System: This attribute is part of the system files.
  • Hidden: With this attribute, the file will not be shown when making a normal directory from the Command Prompt.

Permissions

In addition to the attributes, there are also some permissions:

  • Read: This type of permission is designated as r. Consequently, it allows the file to be read but does not allow writing or modifying anything in the file.
  • Write: This permission type is designated with a w. It also allows writing and modifying a file in its entirety.
  • Run: This attribute is designated with an x. Its function is to allow users or the operating system to execute a file itself.
- Advertisement -

Note that in Windows 10 it is possible to modify these permissions. Consequently, file management will be more reliable.

How to change the attributes of a Windows 10 file

To carry out this process, we must go to the file explorer. With this in mind, press the Win+E combination. Once there, select the file to edit its attributes. Then, from the menu at the top, please click on Properties.

Opening the file properties
Opening the file properties

When you click on the button, a window will pop up. In the Attributes section, you will see the attributes that the file currently has. You can check the box for Hidden or Read-only. The Advanced Options folder is also available.

File attributes
File attributes

In fact, we will see the most extended options of the file.

Advanced file attributes
Advanced file attributes

Let’s look at these options:

  • Folder ready for archiving.
  • Allow files in this folder to have the content indexed in addition to the file properties.
  • Compress content to save disk space.
  • Encrypt content to protect data.

These attributes are not visible by default in the standard file configuration. Therefore, we can activate the checkboxes that we consider necessary for this purpose. Finally, just click on the OK button to apply the changes.

How to change attributes of a file with PowerShell.

PowerShell is a Windows tool for managing items through the console. The first thing you need to know is the file attributes. With this in mind, we will use the following syntax:

Get-ItemProperty File path

Let’s see what it would look like:

Showing file attributes from PowerShell
Showing file attributes from PowerShell

To access much more detailed information, we can make use of the Format-List cmdlet. With this intention, we will use the following syntax.

Get-ItemProperty File path | Format-list -Property * -Force
Showing detailed file attributes in PowerShell
Showing detailed file attributes in PowerShell

From here, we can edit the file attribute. In this opportunity, we are going to hide it. With this in mind, we will use this syntax.

Set-ItemProperty File path -Name Attrib -Value True

The options in the Attribute section are:

  • Archive
  • Hidden
  • Normal
  • Read only
  • System

Change CMD file attributes

We can also change the attributes of a file using CMD. Look at the options we can use from the command prompt. Note that each attribute is defined by a specific letter.

  • R Read-only file attribute.
  • A file attribute file.
  • S System file attribute file.
  • H Hidden file attribute.
  • O Offline attribute.
  • I Indexed file unsatisfied attribute.
  • X No cleanup file attribute.
  • V Integrity attribute.
  • P Pinned attribute.
  • U Attribute not set.
  • B SMR Blob attribute.

Let’s see how to set an attribute. With this in mind, we will use the following syntax:

attrib +R File path

Note that R can be replaced by any of the other attributes listed above. To hide a file, the command will look like this:

Hiding a file from the command prompt
Hiding a file from the command prompt

It is also possible to delete an attribute from the command prompt. To do so, we will use this syntax:

attrib -R File path

Again, the r value is the attribute you want to remove. Therefore, you can replace it with any other. To remove the hidden attribute in a file, we will use the following command:

Removing the hidden attribute in a file from CMD
Removing the hidden attribute in a file from CMD

Conclusion

Okay, so ultimately we have seen how to change the attributes of an item in Windows 10. In addition, we have seen several methods to accomplish this. From the simple Windows graphical interface, to the steps with the command console. This way, we already know what is the attribute that allows a file to be read only. Consequently, you can act to be able to modify it. Additionally, we can remove the hidden attribute from a given folder. The key is to manage user permissions correctly. All in all, it is a great way to increase privacy in the system. See you soon!

- Advertisement -
Everything Linux, A.I, IT News, DataOps, Open Source and more delivered right to you.
Subscribe
"The best Linux newsletter on the web"

LEAVE A REPLY

Please enter your comment!
Please enter your name here



Latest article