Categories: Computer

How to Set or Clear Write Protection via CMD on your USB flash drive

When copying files or formatting your USB drive, if your computer says that ‘The disk is write protected‘ or something related to it means that the disk drive is currently has write protection enabled or real-only attribute is set, even you can not delete any files from the USB unless the real-only attribute will not be remove.

As shown in the screenshot below, when I try to format a write protected USB drive, I see the message.

How to know if write protection is enabled on USB?

Connect the USB and launch command prompt on your Windows PC as an administrator, type the following command in CMD and press Enter after each one:

Diskpart
List Disk
Select Disk X, where X is the disk number of your USB drive.
Attributes Disk

As you can see in the screenshot given above, if the value of ‘Current Read-only State‘ and ‘Read-only‘ is ‘Yes‘, that means write protection is currently enabled on your USB.

Enable / Disable USB write protection on Microsoft Windows

Follow the steps below:

  1. Connect the USB flash drive to your Windows PC.
  2. Launch Command Prompt (CMD) as Administrator (search ‘cmd’ in the start menu, right-click on Command Prompt and select ‘Run as administrator’).
  3. In the CMD type the following command and press enter after each command:
    Diskpart
    List Disk
    Select Disk X, where X is the disk number of your USB drive.

  4. To enable write, deletion, and format protection, just type the following command and press enter:
    Attributes Disk Set Readonly

  5. To disable write, delete, and format protection:
    Attributes Disk Clear Readonly

Write Protection work on other computers?

No, because it applies only to a computer or a PC that you used to enable the protection. If you connect the USB to another computer, then write protection will no longer work. Some USB manufacturers provide a hardware button or any software that enables write protection for all computers. Please check your USB manufacturer’s website for more information.

Robey Thomas

This is a Stuff profile. Credit of Stories goes to all team of Vintaytime, Thank you.

Recent Posts

The Ultimate Guide To Web Hosting: Everything You Need To Know

The internet organization that permits users to view and contact your website is known as…

2 months ago

How To Use The Internet For Personal Development

In the digital age, the internet has become an invaluable tool for personal development. With…

2 months ago

Landing Physician Jobs In Washington State

Washington State is a constituent of US and it is situated in the North-western corner…

2 months ago

Powering The Future: A Comprehensive Guide To AGV Battery Charging Systems

In the fast-paced world of automation and logistics, Automated Guided Vehicles (AGVs) have become indispensable…

2 months ago

Red Dog Casino Review

Red Dog Casino was launched in 2019 to join the crowded real money online casino…

2 months ago

Anavar Steroid Abuse: Common Effects On The Body And Mind

While some turn to anabolic steroids seeking an edge in physical goals, it's important to…

2 months ago