Deactivating File Read-Only Mode in Windows

Deactivating File Read-Only Mode in Windows

Joseph Lv12

Deactivating File Read-Only Mode in Windows

When a file is marked as read-only on Windows, you can only view it and not change it in any way. This essentially protects important files from unauthorized changes.

On Windows, you can set or remove the read-only attribute for a file by modifying its properties. Alternatively, you can also run a command in Command Prompt or Windows PowerShell to do the same. In this article, we take a look at all of them.

1. How to Change the Read-Only Attribute for Files by Modifying Properties

The easiest way to set or remove the read-only attribute for a file on Windows is by modifying its properties. Here’s how you can go about it.

  1. Open File Explorer and navigate to the file for which you want to change the read-only attribute.
  2. Right-click on your file and selectProperties .
  3. Under theGeneral tab, check or uncheck theRead-only box.
  4. ClickApply followed byOK .
    Change Read-Only Attribute by Modifying Properties

Note that Windows may prevent you from changing the read-only attribute of a file if you don’t have the necessary permissions to modify the folder in which the file is located. In that case, you must take ownership of the folder first. If you need help, check our guide on [how to take ownership of folders on Windows](http://How to Take Ownership of Folders in Windows 10 & 11) .

Epubor Audible Converter for Mac: Download and convert Audible AAXC/AA/AAX to MP3 with 100% original quality preserved.

2. How to Change the Read-Only Attribute for Files Using the Command Prompt

Command Prompt is one of two command-line tools available on Windows. You can use it to run batch files, troubleshoot errors, and perform various other tasks. It also lets you change a file’s read-only attribute with a single command. Here are the steps you need to follow.

  1. Right-click on the file for which you want to modify the read-only attribute and selectCopy as path .
  2. PressWin + X to open the Power User menu.
  3. SelectTerminal (Admin) from the list.
  4. SelectYes when the User Account Control (UAC) prompt appears.
  5. In the console, type the following command and pressEnter to set your file as read-only.
    attrib +r "FilePath"

ReplaceFilePath in the above command with the actual path of the file copied earlier.

Change Read-Only Attribute With Command Prompt

Once you run the above command, the file will be set as read-only. Likewise, if you want to remove the read-only attribute for a file, use this command:

attrib -r "FilePath"

Once you remove the read-only attribute for a file, you should be able to edit or modify it.

Like using Command Prompt? Check our guide to learn how to master Command Prompt on Windows .

3. How to Change the Read-Only Attribute for Files Using Windows PowerShell

You can also run a command in Windows PowerShell to change the read-only attribute for a file.

To change the read-only attribute using PowerShell:

  1. Right-click on the file for which you want to change the read-only attribute and selectCopy as path .
  2. Click the magnifying icon on the taskbar or pressWin + S to open the search menu.
  3. TypeWindows PowerShell and selectRun as Administrator .
  4. SelectYes when the User Account Control (UAC) prompt shows up.
  5. Paste the following command and pressEnter to set your file as read-only.
    Set-ItemProperty -Path "FilePath" -Name IsReadOnly -Value $True

ReplaceFilePath in the above command with the actual path of the file copied earlier.

Change Read-Only Attribute With PowerShell

BLUETTI NEW LAUNCH AC180T

Alternatively, if you want to remove the read-only attribute for a file, use this command:

Set-ItemProperty -Path "FilePath" -Name IsReadOnly -Value $False

PCDJ DEX 3 for Windows & MAC is the total entertainment DJ software solution, offering audio, video, and karaoke mixing ability. Automatic beat-sync, smart looping, 4 decks, DJ MIDI controller support, Karaoke Streaming and much more.
DEX 3 meets the demands of today’s versatile DJ, without compromise!
DEX 3 (Audio, Video and Karaoke Mixing Software for Windows/MAC | 3 Activations and Free Updates)

Modifying the Read-Only Attribute for Files on Windows

It’s worth noting that most system files on Windows will have the read-only attribute by default. So, make sure you don’t modify them by mistake. For your other files, you can pick any of the above methods listed above to set or unset their read-only attribute.

  • Title: Deactivating File Read-Only Mode in Windows
  • Author: Joseph
  • Created at : 2024-08-15 15:59:49
  • Updated at : 2024-08-16 15:59:49
  • Link: https://windows11.techidaily.com/deactivating-file-read-only-mode-in-windows/
  • License: This work is licensed under CC BY-NC-SA 4.0.