Software & Apps Windows 23 23 people found this article helpful What Is a File Attribute? List of file attributes in Windows by Tim Fisher General Manager, VP, Lifewire.com Tim Fisher has 30+ years' professional technology support experience. He writes troubleshooting content and is the General Manager of Lifewire. our editorial process Facebook Twitter LinkedIn Tim Fisher Updated on July 10, 2019 yuoak / DigitalVision Vectors / Getty Images Windows The Ultimate Laptop Buying Guide Tweet Share Email A file attribute (often just referred to as an attribute or a flag) is a specific condition in which a file or directory can exist. An attribute is considered either set or cleared at any given time, which means it's either enabled or isn't. Computer operating systems, like Windows, can tag data with specific file attributes so that data can be treated differently than data with an attribute turned off. Files and folders aren't actually changed when attributes are applied or removed, they're just understood differently by the operating system and other software. What Are the Different File Attributes? A number of file attributes exist in Windows, including the following: Archive file attributeDirectory attributeHidden file attributeRead-only file attributeSystem file attributeVolume label attribute The following file attributes were first available to the Windows operating system with the NTFS file system, meaning they aren't available in the older FAT file system: Compressed file attributeEncrypted file attributeIndexed file attribute Here are several additional, albeit more rare, file attributes recognized by Windows: Device file attributeIntegrity file attributeNot content indexed file attributeNo scrub file attributeOffline file attributeSparse file attributeTemporary file attributeVirtual file attribute You can read more about these on Microsoft's File Attribute Constants page. Technically there's also a normal file attribute, implying no file attribute at all, but you'll never see this actually referenced anywhere within your normal Windows use. Why Are File Attributes Used? File attributes exist so that you, or a program you're using, or even the operating system itself, can be granted or denied particular rights to a file or folder. Learning about common file attributes can help you understand why certain files and folders are referred to as "hidden" or "read-only," for example, and why interacting with them is so different than interacting with other data. Read-only Attribute Message. Applying the read-only file attribute to a file will prevent it from being edited or changed in any way unless the attribute is lifted to allow write access. The read-only attribute is often used with system files that shouldn't be altered, but you could do the same with your own files that you'd rather someone with access not edit. Files with the hidden attribute set will actually be hidden from normal views, making these files really difficult to accidentally delete, move, or change. The file still exists like every other file, but because the hidden file attribute is toggled, it prevents the casual user from interacting with it. You can set Windows to view hidden files and folders as an easy way to see these files without toggling the attribute off. You can also combine attributes so that a file is, for example, not only hidden but also marked as a system file and set with the archive attribute. File Attributes vs Folder Attributes Attributes can be toggled on and off for both files and folders, but the consequences of doing so differ a bit between the two. When a file attribute like the hidden attribute is toggled on for a file, that single file will be hidden, nothing else. If the same hidden attribute is applied to a folder, you're given more options than to just hide the folder: you have the option to apply the hidden attribute to the folder alone or to the folder, its subfolders, and all of its files. Folder Attributes. Applying the hidden file attribute to a folder's subfolders and its files mean that even after you open the folder, all the files and folders that are contained within it will be hidden as well. The first option of just hiding the folder alone would make the subfolders and files visible, but just hide the main, root area of the folder. How File Attributes Are Applied Although all of the available attributes for a file have common names, which you saw in the lists above, they aren't all applied to a file or folder in the same way. Attributes for Files and Folder (Windows). A small selection of attributes can be turned on manually. In Windows, you can do this by right-clicking (or tap-and-hold on touch interfaces) a file or folder, opening its properties, and then enabling or disabling an attribute from the list provided. Attrib Command (Windows 10). In Windows, a larger selection of attributes can also be set with the attrib command, available from Command Prompt. Having attribute control via a command allows third-party programs, like backup software, to easily edit file attributes. Setting the +i (Immutable) Bit via chattr in Ubuntu. Linux operating systems can use the chattr (Change Attribute) command to set file attributes, while chflags (Change Flags) is used in macOS.