How to Fix or Unset Read-only Attribute of Files and Folders in Windows 10

In Windows, you can set or unset the read-only aspect for files and folders to requite files write protection.

Folders cannot actual be gear up as read-but though. Only files in the folder will be prepare as read-just instead.

When a file (ex: text file) is gear up as read-only, the file tin can no longer be altered since it no longer allows write permission. You will still be able to save your changes to the file as a new file though.

This tutorial volition prove you different ways on how to set or unset the read-but attribute of files and folders in Windows ten.

Set or Unset Read-only Attribute of Files and Folders in Windows 10-neutral.png Read-merely box = Neutral setting of a folder that is e'er displayed past default.
Set or Unset Read-only Attribute of Files and Folders in Windows 10-checked.png Read-but box = File is currently read-only. Simply displays temporarily for a binder while setting to be applied to files in binder.
Set or Unset Read-only Attribute of Files and Folders in Windows 10-empty.png Read-only box = File is currently not read-only. Just displays temporarily for a folder while setting to be applied to files in binder.

Contents


  • Option One: To Set Read-but Attribute of Files and Folders from Properties
  • Selection Ii: To Unset Read-only Attribute of Files and Folders from Properties
  • Option Three: To Set up Read-only Attribute of File using Command Prompt
  • Option Iv: To Unset Read-merely Aspect of File using Command Prompt
  • Option Five: To Set Read-simply Attribute of All Files in Binder and Subfolders using Command Prompt
  • Choice Six: To Unset Read-only Attribute of All Files in Folder and Subfolders using Command Prompt
  • Option Vii: To Prepare Read-only Attribute of File using PowerShell
  • Pick Viii: To Unset Read-only Attribute of File using PowerShell
  • Option Nine: To Set Read-only Aspect of All Files in Folder and Subfolders using PowerShell
  • Option Ten: To Unset Read-only Attribute of All Files in Folder and Subfolders using PowerShell

EXAMPLE: File is set to read-just message
Set or Unset Read-only Attribute of Files and Folders in Windows 10-read-only_message.png

OPTION ONE

To Set up Read-simply Aspect of Files and Folders from Backdrop

1 Open File Explorer (Win+Eastward).

2 Select one or more than files and/or folders you desire to set as read-only, right click or printing and concord on the selected items, and click/tap on Properties. (run across screenshot below)

Set or Unset Read-only Attribute of Files and Folders in Windows 10-read-only_files_folders_properties.jpg

3 In the General tab, check the Read-only box in the bottom Attributes section, and click/tap on OK. (meet screenshots below)

Set or Unset Read-only Attribute of Files and Folders in Windows 10-set_read-only_files_folders_properties.jpg

iv If yous selected a folder, select (dot) to either Apply changes to this binder only or Apply changes to this folder, subfolders and files for what yous want, and click/tap on OK. (see screenshots below)

Use changes to this binder only will only not exist grayed out if you selected other files or folders in addition with this folder.

If you select (dot) Apply changes to this folder only, any selected folders and their contents volition be ignored.

Set or Unset Read-only Attribute of Files and Folders in Windows 10-confrim_set_read-only_files_folders.jpg

OPTION TWO

To Unset Read-just Attribute of Files and Folders from Properties

ane Open File Explorer (Win+E).

2 Select one or more than files and/or folders you desire to unset as read-only, correct click or printing and concur on the selected items, and click/tap on Properties. (see screenshot below)

Set or Unset Read-only Attribute of Files and Folders in Windows 10-read-only_files_folders_properties.jpg

3 In the General tab, uncheck the Read-only box in the bottom Attributes section, and click/tap on OK. (encounter screenshots beneath)

Set or Unset Read-only Attribute of Files and Folders in Windows 10-unset_read-only_files_folders_properties.jpg

iv If you selected a folder, select (dot) to either Apply changes to this folder simply or Apply changes to this folder, subfolders and files for what you desire, and click/tap on OK. (run into screenshots below)

Apply changes to this folder only will simply not exist grayed out if you selected other files or folders in addition with this binder.

If you select (dot) Apply changes to this folder only, any selected folders and their contents will be ignored.

Set or Unset Read-only Attribute of Files and Folders in Windows 10-confrim_unset_read-only_files_folders.jpg

OPTION Iii

To Gear up Read-merely Attribute of File using Command Prompt

1 Open a command prompt or elevated command prompt based based on the access permissions you lot have for the file.

two Type the command below into the command prompt, and press Enter. (encounter screenshot below)

attrib +r "total path of file with extension"

Substitute full path of file with extension in the command in a higher place with the actual full path of the file you want to set as read-only.

For example: attrib +r "C:\Users\Brink\Desktop\Folder\File1.txt"

Set or Unset Read-only Attribute of Files and Folders in Windows 10-set_read-only_file_command.png

OPTION Four

To Unset Read-only Aspect of File using Command Prompt

1 Open up a command prompt or elevated command prompt based based on the access permissions you lot take for the file.

2 Type the control below into the command prompt, and press Enter. (see screenshot below)

attrib -r "total path of file with extension"

Substitute full path of file with extension in the command above with the actual full path of the file you desire to unset every bit read-only.

For example: attrib -r "C:\Users\Brink\Desktop\Folder\File1.txt"

Set or Unset Read-only Attribute of Files and Folders in Windows 10-unset_read-only_file_command.png

Choice FIVE

To Fix Read-only Attribute of All Files in Folder and Subfolders using Command Prompt

i Open a command prompt or elevated command prompt based based on the access permissions yous have for the folder.

2 Blazon the command below into the command prompt, and press Enter. (come across screenshot beneath)

attrib +r "full path of folder\*" /s /d

Substitute full path of binder in the command above with the actual full path of the binder you want to set read-only for all files in this folder and its subfolders.

For example: attrib +r "C:\Users\Brink\Desktop\Binder\*" /south /d

Set or Unset Read-only Attribute of Files and Folders in Windows 10-set_read-only_subfolders_and_files_command.png

OPTION Six

To Unset Read-simply Aspect of All Files in Folder and Subfolders using Command Prompt

1 Open up a command prompt or elevated command prompt based based on the access permissions you have for the folder.

2 Type the command beneath into the command prompt, and printing Enter. (encounter screenshot below)

attrib -r "full path of folder\*" /s /d

Substitute full path of folder in the command higher up with the bodily full path of the folder y'all want to unset read-only for all files in this folder and its subfolders.

For instance: attrib -r "C:\Users\Brink\Desktop\Folder\*" /due south /d

Set or Unset Read-only Attribute of Files and Folders in Windows 10-unset_read-only_subfolders_and_files_command.png

Choice Vii

To Ready Read-only Attribute of File using PowerShell

To see more usage options for the Set-ItemProperty command, see: Fix-ItemProperty - Microsoft Docs

i Open up PowerShell or elevated PowerShell based on the admission permissions you lot have for the file.

ii Type the command below into PowerShell, and press Enter. (meet screenshot below)

Ready-ItemProperty -Path "full path of file with extension" -Proper name IsReadOnly -Value $True

Substitute total path of file with extension in the control above with the actual full path of the file you want to set as read-only.

For case: Prepare-ItemProperty -Path "C:\Users\Brink\Desktop\Folder\File1.txt" -Name IsReadOnly -Value $Truthful

Set or Unset Read-only Attribute of Files and Folders in Windows 10-set_read-only_file_powershell.png

OPTION EIGHT

To Unset Read-only Attribute of File using PowerShell

To see more usage options for the Set-ItemProperty command, run across: Fix-ItemProperty - Microsoft Docs

1 Open PowerShell or elevated PowerShell based on the admission permissions you have for the file.

ii Blazon the control below into PowerShell, and press Enter. (see screenshot beneath)

Set-ItemProperty -Path "total path of file with extension" -Proper name IsReadOnly -Value $False

Substitute full path of file with extension in the command higher up with the bodily full path of the file you want to unset as read-only.

For example: Set up-ItemProperty -Path "C:\Users\Brink\Desktop\Folder\File1.txt" -Name IsReadOnly -Value $False

Set or Unset Read-only Attribute of Files and Folders in Windows 10-unset_read-only_file_powershell.png

OPTION Ix

To Set up Read-just Aspect of All Files in Folder and Subfolders using PowerShell

To encounter more usage options for the Get-ChildItem command, run into: Get-ChildItem - Microsoft Docs

ane Open PowerShell or elevated PowerShell based on the access permissions you lot have for the folder.

2 Type the command below into PowerShell, and printing Enter. (see screenshot beneath)

Go-ChildItem -Path "full path of file with extension" -Recurse -File | % { $_.IsReadOnly=$True }

Substitute full path of file with extension in the control above with the bodily full path of the folder yous want to set read-only for all files in this binder and its subfolders.

For example: Get-ChildItem -Path "C:\Users\Brink\Desktop\Folder\File1.txt" -Recurse -File | % { $_.IsReadOnly=$True }

Set or Unset Read-only Attribute of Files and Folders in Windows 10-set_read-only_subfolders_and_files_powershell.png

Selection Ten

To Unset Read-only Attribute of All Files in Binder and Subfolders using PowerShell

To see more usage options for the Go-ChildItem control, run into: Get-ChildItem - Microsoft Docs

1 Open PowerShell or elevated PowerShell based on the access permissions yous have for the folder.

2 Blazon the command below into PowerShell, and printing Enter. (see screenshot below)

Go-ChildItem -Path "total path of file with extension" -Recurse -File | % { $_.IsReadOnly=$False }

Substitute total path of file with extension in the command above with the bodily total path of the folder yous desire to unset read-but for all files in this binder and its subfolders.

For example: Get-ChildItem -Path "C:\Users\Brink\Desktop\Binder\File1.txt" -Recurse -File | % { $_.IsReadOnly=$False }

Set or Unset Read-only Attribute of Files and Folders in Windows 10-unset_read-only_subfolders_and_files_powershell.png

That's it,
Shawn

  • Windows 11 Tutorials