Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Windows file attributes are metadata flags such as Read-only, Hidden, System, and Archive. They are separate from NTFS permissions, encryption, compression, file extensions, and timestamps.

You can change common attributes from File Explorer, or use the attrib command to process several files, include subfolders, or change flags that File Explorer does not expose directly.

What Windows file attributes do

A file can have more than one attribute at the same time. For example, a file may be both hidden and read-only. The attribute does not determine who is allowed to access the file; that is controlled primarily by NTFS permissions and other security features.

Attribute Purpose
Read-only Normally prevents applications from writing to or deleting a file. It is not an NTFS permission and is not honored on directories.
Hidden Excludes a file or folder from ordinary File Explorer listings.
System Marks an item as used by the operating system. System files may remain hidden even when ordinary hidden items are shown.
Archive Marks an item as changed since the last backup. Tools such as xcopy can use this flag.
Not content indexed Prevents the Windows content-indexing service from indexing the item.
Offline Indicates that file data is not immediately available locally, commonly in remote or hierarchical storage systems.
Pinned / Unpinned Used by supported storage systems to indicate whether data should remain locally available.

Compressed and Encrypted are also Windows file attributes, but they are managed through separate File Explorer or command-line operations rather than the ordinary attrib switches covered below.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Sale
Amazon Basics 3-Button USB Wired Mouse with Responsive Tracking, Plug & Play, Compatible with Windows and Mac, Black
  • Computer mouse for easily navigating a computer interface; click, scroll, and more
  • USB-A wired connection; if existing device only supports USB-C, an additional adapter will be required
  • High-definition (1000 dpi) optical tracking ensures responsive cursor control for precise tracking and easy text selection
  • 3 buttons offer effortless fingertip control
  • Plug-and-go ready for instant use

Change Read-only or Hidden in File Explorer

Windows 11

  1. Open File Explorer and locate the file or folder.
  2. Right-click it.
  3. Select Show more options if Properties is not shown in the streamlined menu.
  4. Select Properties.
  5. On the General tab, find Attributes.
  6. Select or clear Read-only or Hidden.
  7. Select Apply, then OK.

When changing a folder, Windows may ask whether the operation applies only to that folder or to this folder, subfolders and files. Choose the recursive option only when that is what you intend.

Windows 10

  1. Open File Explorer.
  2. Right-click the item and select Properties.
  3. On the General tab, change Read-only or Hidden under Attributes.
  4. Select Apply, then OK.
  5. If the item is a folder, choose whether the change applies to the folder alone or to its contents.

These Properties settings are different from the controls that merely decide whether File Explorer displays hidden items.

Show hidden files and folders

Windows 11

In File Explorer, select View > Show > Hidden items.

Windows 10

  1. Open File Explorer and select View > Options > Change folder and search options.
  2. Open the View tab.
  3. Under Advanced settings, select Show hidden files, folders, and drives.
  4. Select OK.

A file with both Hidden and System attributes can remain concealed. To expose protected operating-system files, open the same Folder Options dialog, clear Hide protected operating system files (Recommended), and confirm the warning. Do this only when necessary: it makes important files easier to alter or delete accidentally.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use Command Prompt and attrib

attrib is Windows’ standard command for displaying, setting, and clearing file attributes. A normal Command Prompt is usually enough for files you own. For protected locations, open Windows Terminal (Admin) or Command Prompt (Admin) from Start. Elevation does not automatically bypass NTFS permissions, ownership, file locks, or security software.

Display the current attributes

attrib "C:\Path\file.txt"

With no attribute switches, the command reports the attributes of matching files. Replace the example path with the complete path to your item.

Set an attribute

attrib +r "C:\Path\file.txt"
attrib +h "C:\Path\file.txt"
attrib +s "C:\Path\file.txt"
attrib +a "C:\Path\file.txt"

Switch Sets
+r Read-only
+h Hidden
+s System
+a Archive
+i Not content indexed
+o Offline
+p Pinned
+u Unpinned

The command also documents switches for Scrub (+x) and SMR Blob (+b), which are intended for supported storage scenarios rather than routine desktop file management.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
Sale
Logitech M185 Compact Ambidextrous 2.4 GHz Wireless Mouse - Swift Grey
  • Compact Mouse: With a comfortable and contoured shape, this Logitech ambidextrous wireless mouse feels great in either right or left hand and is far superior to a touchpad
  • Durable and Reliable: This USB wireless mouse features a line-by-line scroll wheel, up to 1 year of battery life (2) thanks to a smart sleep mode function, and comes with the included AA battery
  • Universal Compatibility: Your Logitech mouse works with your Windows PC, Mac, or laptop, so no matter what type of computer you own today or buy tomorrow your mouse will be compatible
  • Plug and Play Simplicity: Just plug in the tiny nano USB receiver and start working in seconds with a strong, reliable connection to your wireless computer mouse up to 33 feet / 10 m (5)
  • Better than touchpad: Get more done by adding M185 to your laptop; according to a recent study, laptop users who chose this mouse over a touchpad were 50% more productive (3) and worked 30% faster (4)

Clear an attribute

Use a minus sign instead of a plus sign:

attrib -r "C:\Path\file.txt"
attrib -h "C:\Path\file.txt"
attrib -s "C:\Path\file.txt"
attrib -a "C:\Path\file.txt"
attrib -i "C:\Path\file.txt"

To make a hidden system file visible, clear both relevant flags:

attrib -h -s "C:\Path\file.ext"

Microsoft documents that System and Hidden must be cleared before other attributes can be changed on an item. If a combined command fails, use this two-step sequence:

attrib -h -s "C:\Path\file.ext"
attrib +r "C:\Path\file.ext"

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Change attributes recursively

Use /s to process matching files in the current directory and its subdirectories:

attrib -r "C:\Reports\*.docx" /s

/s processes files, not the directories themselves. Add /d when directory attributes must also be changed:

attrib -h -s "C:\Data\*" /s /d

Be careful with broad wildcards. This command changes matching items throughout the entire C:\Data tree, including files you may not have intended to modify.

For symbolic links, attrib normally operates on the link target. Add /l to change the attributes of the symbolic link itself:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Sale
Logitech B100 Ambidextrous Wired Mouse - Black
  • A comfortable, ambidextrous shape feels good in either hand, so you feel more comfortable as you work-even at the end of the day
  • With 800 dpi sensitivity, you'll get precise cursor control so you can edit documents and navigate the Web more efficiently
  • Side-to-side scrolling plus zoom lets you instantly zoom in or out and scroll horizontally and vertically; perfect for working with spreadsheets and presentations.
  • Zero setup with flexible connectivity means you just plug it into your USB or PS/2 port-it works right out of the box
  • This mouse is built by Logitech-the mouse experts; it comes with the quality and design we've built into more than a billion mice, more than any other manufacturer

attrib +h "C:\Links\shortcut-name" /l

Change attributes with PowerShell

PowerShell is useful when an operation is part of a script or when you need to preserve other flags while changing one attribute.

Read the current values

Get-Item "C:\Path\file.txt" | Format-List Name,Attributes,IsReadOnly

Set or clear Read-only

Set-ItemProperty -Path "C:\Path\file.txt" -Name IsReadOnly -Value $true
Set-ItemProperty -Path "C:\Path\file.txt" -Name IsReadOnly -Value $false

Set a combination of flags

$file = Get-Item "C:\Path\file.txt"
$file.Attributes = [System.IO.FileAttributes]::Hidden

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Assigning Attributes this way replaces the current combination. To set Hidden and Read-only together, use a bitwise OR:

$file.Attributes = [System.IO.FileAttributes]::Hidden -bor [System.IO.FileAttributes]::ReadOnly

To remove only Hidden while preserving the other flags:

$file.Attributes = $file.Attributes -band (-bnot [System.IO.FileAttributes]::Hidden)

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #4
Lenovo 100 Wired USB Computer Mouse for PC, Laptop, Computer with Windows - Full-Size - Ambidextrous Design - 3 Buttons - Red Optical Sensor – Black
  • Slim and Comfortable Design: The Lenovo 100 Wired USB Mouse boasts a slim grip full-size mouse with an ambidextrous design, ensuring a comfortable fit in your hand, whether you're left or right-handed.
  • Built to Last: Rest assured about durability with the Lenovo 100 Wired USB Mouse. It's engineered for a 3 million clicks button life, delivering long-lasting performance that stands the test of time.
  • Reliable Wired Connection: Enjoy an easy and reliable connection to your PC via a 1.7-meter USB-A cable. No need to worry about signal drop-offs or battery replacements; this mouse is always ready for action.
  • Precision and Smooth Movement: The Lenovo 100 Wired USB Mouse offers precise movement with its 1000 DPI resolution and red optical sensor. Glide smoothly from window to window, ensuring accurate and efficient navigation.
  • Plug-and-Play Convenience: This hassle-free mouse is designed for productivity. It features a straightforward plug-and-play connection to PCs with a USB-A cable, making it a practical choice for users seeking a reliable and efficient pointing device.

When changing an attribute does not solve the problem

“Access is denied”

This can mean that your account lacks permission, another identity owns the file, the path is protected, or another process or security product is holding the item. Running as administrator may help with elevation, but it does not override every restriction.

Clearing Read-only does not make the file editable

NTFS DACL permissions, ownership, inherited restrictions, application locks, Controlled Folder Access, cloud-storage state, and file-system errors can all prevent writing after Read-only has been cleared.

Inspect NTFS permissions separately with:

icacls "C:\Path\file.txt"

icacls is an ACL command, not an attribute command. It replaces the deprecated cacls utility and should not be used when the only problem is a Hidden or Read-only flag.

A folder’s Read-only box behaves unexpectedly

The Read-only attribute is not honored on directories. Checking it on a folder does not reliably make every file inside read-only. Target the files directly, or use an appropriate recursive attrib command.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Paths with spaces fail

Put the complete path in double quotes:

attrib -r "C:\Users\Example User\Documents\file.txt"

Very long paths fail

Some traditional applications still impose the 260-character MAX_PATH limit. Newer Windows versions can support extended paths when the application is long-path aware and the relevant system policy is enabled, but enabling the registry setting alone does not make every program support long paths. Shorten the path or use a tool that explicitly supports long paths when possible.

Attribute changes versus permissions, encryption, and compression

Need Use
Hide an item in ordinary Explorer views Hidden attribute or File Explorer’s visibility settings
Stop normal applications writing to a file Read-only attribute, where the application honors it
Control which users can read or modify an item NTFS permissions and ownership
Protect file contents from unauthorized reading Encryption, such as EFS or BitLocker where appropriate
Reduce storage space NTFS compression or another compression tool

Changing an attribute is therefore not a substitute for securing confidential data or repairing an NTFS permission problem.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Sources and Windows version note

The procedures above follow Microsoft’s documentation for attrib, file attribute constants, File Explorer, and icacls.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
Sale
Acer Wireless Mouse for Laptop, 2.4GHz Computer Mouse 3 Adjustable 1600 DPI
  • 【Plug and Play for Home/Office/School】The wireless computer mouse features 2.4GHz connectivity, delivering a stable, interference-free connection up to 32ft. Designed for 𝐦𝐞𝐝𝐢𝐮𝐦 𝐭𝐨 𝐥𝐚𝐫𝐠𝐞 𝐬𝐢𝐳𝐞𝐝 𝐡𝐚𝐧𝐝𝐬, it ensures comfortable use all day. Simply plug in the USB-A receiver for instant pairing—no drivers needed. 📌📌 If the mouse isn’t suitable, place the USB receiver in the battery compartment and return both.
  • 【3 Levels Adjustable DPI】This travel USB mouse offers 3 adjustable DPI settings (800, 1200, 1600), allowing you to customize sensitivity for precise design work. Effortlessly switch to match your task and elevate your productivity. 📌 Please remove the film at the bottom of the mouse before use.
  • 【Effortless Browsing】Equipped with forward and backward buttons, this computer mice streamlines your workflow, making it easy to navigate through web pages and files with a simple click. 📌Side button does not work on Mac.
  • 【Visible Indicator Light】 The pc mouse features a visual indicator for DPI levels and low battery alerts. The red light flashes once for 800 DPI, twice for 1200 DPI, and three times for 1600 DPI. When the battery level is below 10%, the light flashes red until the mouse is completely out of power.
  • 【Click to Wake】With smart sleep mode, it saves power by standby after 10 inactive minutes, just 2-3 clicks to wake. This efficient design delivers 3x longer battery life than motion-wake mice. Engineered for durability, its buttons and scroll wheel are tested for 10 million clicks, ensuring long-term reliability and consistent performance.

Windows 11 uses a streamlined right-click menu, so older commands may be under Show more options. In Windows 11 version 22H2, the former Quick access landing page was renamed File Explorer Home. Windows 10 support ended on October 14, 2025, although attrib remains documented for Windows 10 and Windows 11.

FAQ

How do I remove Read-only from a file in Windows?

Right-click the file, select Properties, clear Read-only on the General tab, and select Apply. From Command Prompt, use attrib -r "C:\Path\file.txt".

Why is a hidden file still not visible?

It may also have the System attribute, or File Explorer may still be hiding protected operating-system files. Run attrib -h -s "C:\Path\file.ext", then enable Hidden items. Only disable the protected-file setting when necessary.

Does Read-only on a folder make all files inside it read-only?

No. Windows does not honor the Read-only attribute on directories in the same way as on files. Apply the attribute to the files directly, using attrib -r "C:\Folder\*" /s or another carefully targeted command.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Does Read-only prevent someone from deleting a file?

It is not a security boundary. Applications normally cannot write to or delete a read-only file, but NTFS permissions, ownership, administrator tools, and application behavior determine actual access.

What is the difference between attrib and icacls?

attrib changes file metadata flags such as Hidden and Read-only. icacls displays or changes NTFS access-control permissions. They solve different problems.

The Bottom Line

Use File Explorer Properties for a single file’s Read-only or Hidden setting. Use attrib for exact commands, multiple flags, wildcards, and recursive operations; use PowerShell when you need scripting or bit-level control. If the operation still fails, investigate NTFS permissions, ownership, locks, security software, or cloud-storage status rather than repeatedly changing the attribute.

Quick Recap

SaleBestseller No. 1
Amazon Basics 3-Button USB Wired Mouse with Responsive Tracking, Plug & Play, Compatible with Windows and Mac, Black
Amazon Basics 3-Button USB Wired Mouse with Responsive Tracking, Plug & Play, Compatible with Windows and Mac, Black
Computer mouse for easily navigating a computer interface; click, scroll, and more; 3 buttons offer effortless fingertip control
$6.79
SaleBestseller No. 2
Logitech M185 Compact Ambidextrous 2.4 GHz Wireless Mouse - Swift Grey
Logitech M185 Compact Ambidextrous 2.4 GHz Wireless Mouse - Swift Grey
Product carbon footprint: 3.97 kg CO2e; Contoured shape: Gives you more comfort and control
$12.34
SaleBestseller No. 3
Logitech B100 Ambidextrous Wired Mouse - Black
Logitech B100 Ambidextrous Wired Mouse - Black
Product carbon footprint: 1.73 kg CO2e
$6.99

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.