File attributes are metadata settings that describe or control the behavior of files on a system. On Windows NTFS, common attributes include read-only, hidden, archive, compressed, and encrypted, each toggled independently per file.
File Attributes
Files have something called attributes. Attributes are something that we turn on or off on the file that either describe the file or affect the behavior of the file.
The first thing is that attributes are stored as metadata. It's additional information about a file. Attributes can either describe what a file is, and/or affect the behavior of how this file is presented and how it behaves.
One example of this is that we can turn on the attribute read only, and by turning that on then we can't alter the file. It's read only, we can't write to that file. So that's one example of an attribute.
Here are some of the attributes that we find on Windows NTFS systems, and these attributes typically have two different states, kind of an on or off switch that we have for each one of these attributes.
Let's get on our demo machine and take a look at what this looks like. Here's a file right here. I'm going to right-click on this file and go to Properties. I can see this attributes section down here, and I've got two options here, read only and hidden, and there's some advanced ones as well.
Let's try this read only. I'm going to click on it to enable it, hit okay, and let's open it up. I'm going to open it up in the text editor, and then we're going to make another change to this, so we'll just add that. I'll go to File and Save, and notice now that brings up the Save As box, and I'm just going to try to save it over the original file. It's going to say do I want to replace it, yes, and here we get "this file is set to read only, try again with a different file name." So we can't save it because that file is read only.
So if I'm going to make a change to this, what I'm going to have to do is remove that read only that I checked before, and now I can go back and change this and save the changes. So I'll go File, Save, and I'm able to save it and the changes are saved.
There is in the details section a list where it has the attributes, and we see an A and an L right here, and so that stands for something. Each one of these attributes has a letter associated with it. A means that it's available for archive, and the L means that it's a reparse point.
On our file here I can right-click on this and we're going to go to Properties, and within the details I can see this particular one has just the A, the archive. If I wanted to change that, what I could do is I could go into the Advanced, and here's the archiving one, so I can uncheck that, okay, apply, and then go back into the details. Maybe I do need to do a refresh here, so I'm going to go back into the properties details, and we can see that that A has disappeared.
Let's play around with another one of these. What I'm going to do is I'm going to go to the attributes section right here and do hidden, and let's go ahead and hide this. So I'll hit apply, and now that file is hidden. I can't see that file.
Now the problem is that file can't be seen, so I can't edit it, I can't access it, I can't even turn off that attribute. One thing I can do to make that reappear, or show all the hidden folders on my system, is I can click on the start menu, and I'm going to do a "show hidden files and folders." So I'll hit there and my settings comes up, and one of the options here is show hidden and system files. It's off right now, and I'm going to show them, so I'm going to turn them on, and notice now that file exists here. So that's an attribute I can turn on and off, but it's also a setting, whether I want those to be viewable or not.
Let's take a look at a couple of the other attributes that we have on here, so I'm going to go into Properties. We played around with the read only, we played around with the hidden. We have this Advanced, and we also have these compressed and encrypt options here. I'm not going to get in depth in this lesson on that, but just know that we have this compression and encryption attribute that we can turn on and off as well.
TechKnowSurge builds IT and cybersecurity professionals through hands-on, concept-first training built around real understanding — not memorization. Free interactive tools, structured programs, and 25+ years of real-world experience, all in one place.
Explore free tools and programs →