Home  >  Article  >  Computer Tutorials  >  How to solve the problem of unable to copy files due to disk write protection

How to solve the problem of unable to copy files due to disk write protection

WBOY
WBOYOriginal
2024-02-24 23:51:061264browse

What to do if the disk is write-protected and unable to copy things

The disk is write-protected means that the disk cannot be written to during use, which means that files and files on the disk cannot be copied, deleted, or modified. folder. This often happens with storage devices such as USB flash drives, SD cards, and hard drives. When encountering the problem that the disk is write-protected, we can try the following methods to solve it.

Method 1: Check the switch

Before starting other solutions, we must first check whether there is a hardware switch or lock switch on the storage device. Many USB flash drives and SD cards are equipped with a toggle button that can be used to protect data so that it cannot be written to. Make sure the switch is toggled on so data can be written.

Method 2: Use the command prompt

Open the command prompt and run it as an administrator. Search for "Command Prompt" in the Start menu and right-click "Run as administrator."

Enter the following command and press the Enter key:
diskpart

Enter the following command and press the Enter key:
list disk

This command will display a list of all disks on the computer. Find the disk number you want to repair. Then enter the following command and press the Enter key (assuming the disk number is 1):
select disk 1

Enter the following command and press the Enter key:
attributes disk clear readonly

This command will clear the read-only attribute of the disk so that it can write data. You should now be able to copy files to the disk.

Method 3: Use the Registry Editor

Open the Registry Editor. Press the Windows key R key, type "regedit" and press Enter.

Navigate to the following path:
HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlStorageDevicePolicies

If the "Storage Device Policies" key does not exist, you will need to create it. Right-click the Control folder, select New > Key, and name it Storage Device Policy.

In the "Storage Device Policy" folder, right-click the blank area and select "New" > "DWORD Value (32-bit)". Name the new DWORD value "WriteProtect".

Double-click "WriteProtect" and change its numerical data to "0".

Close the Registry Editor and restart the computer. Now you should be able to copy the files to disk.

Method 4: Use professional tools

If the above method does not work, you can try to use some professional disk repair tools. There are many free and paid tools to choose from, such as DiskGenius, EaseUS Partition Master, etc. These tools often have functions to repair the disk, including removing write protection.

However, before using these tools, please make sure to back up your important data to prevent data loss.

Conclusion

Disk being write-protected is a common problem, but we can solve it by trying some simple methods. First, check whether the hardware switch or lock switch is turned on. Second, you can use Command Prompt or Registry Editor to clear the read-only attribute of the disk. Finally, if needed, you can use some professional disk repair tools. During operation, be careful to avoid data damage or loss caused by incorrect operation.

The above is the detailed content of How to solve the problem of unable to copy files due to disk write protection. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn