It sometimes happens that you give your SD card or USB drive to your friend, any person or unknowingly connect it with any infected computer and in return you get infected files (Virus, Spywares, worms, etc.) on your device which get a transfer from your friend’s or the person’s computer. Sometimes any person puts some kind of infected file in your device intentionally. But don’t worry, you can add write protection to your USB drive and avoid it.
There was a time when pen-drives used to come with a write protection mechanism which consists of a switch on a housing of the drive itself, but now very few such pen-drives are available with that feature. Now, we can easily Add or Remove Write Protection from USB drive or SD card using Command Prompt.
By definition, Write protection is the ability of a hardware device or software program to prevent new information from being written or old information being changed. Typically, this means you can read the data, but not write. Which simply means, a person can view and copy any file from your pen-drive\SD cards, but he (or anyone) can not make any change in the pen drive\SD card like Formatting, Deleting files or Copying any file (including infected files like Virus, Spyware, worms, etc.) to your pen-drive\SD card.
Adding or Removing Write Protection From your USB drive\SD card
Follow the following steps to Add Write Protection:
Type cmd in the Run box to open Command Prompt.
Now in Command Prompt window, Type “diskpart” without “” as given in the image below:
Now diskpart window will appear (New window will not appear and it will continue from the next line if you have Run the Command Prompt as an administrator) as given in the image below:
Now in the diskpart window, type “list disk” without ” ” and press Enter to check the list of drives connected to the computer as shown in the image below:
Check your USB drive\SD card from the list according to the Size and then type “select disk ###” without “” where ### is the disk number. Here in the image below I have typed “select disk 1” because my drive was ‘disk 1‘. Similarly, you can find yours by checking size.
Now type “attributes disk” without “” and press Enter button to see the permission of the drive.
After following step 6, you will observe that a list of state and permissions will appear. Here you can check that ‘Current Read-only State: No‘ which means there is no write protection added on the drive. As shown in the image below:
Now to Add Write Protection, type “attribute disk set readonly” without “”. As highlighted in the image below:
Now you have successfully added Write Protection to your USB Drives. Whoever tries to make any change in the pen-drive\SD card like Formatting, Deleting files or To copy any file to your pen-drive\SD card, these messages will pop up:
To Remove Write Protection from USB or SD Card
Follow till ‘Step 6’.
You will now observe that a list of state and permissions will appear. Here you can check that ‘Current Read-only State: Yes‘ (highlighted in the image) which means there is Write Protection added on the drive. As shown in the picture below:
Now to Remove Write Protection, type “attributes disk clear readonly” without “”. As highlighted in the image below:
Now you have successfully Removed Write Protection from your USB Drives. Anyone can make any changes in the pen-drive\SD card like Formatting, Deleting files or Copying any file to your pen-drive\SD card.
That’s it! We have now seen how to Add or Remove Write Protection and its importance in saving the Data in the USB drive\SD Card from being deleted and also saving the device from the infected file by restricting any thing to get copied to the device.
- How to Install Apps on the SD Card or Other Removable Storage in Windows 10?
- TRP Guides: How to Make Windows 10 Run Faster on PC?
- 17 Cool Computer Command Prompt Tricks and Hacks for Windows Users
- 13 Excellent Microsoft Edge Tips and Tricks for Windows 10 Absolute Beginners
- 11 Best Media Players for Windows – Paid + Free Windows Media Players