How to remove write protection from usb flash-drive?

The “write-protected” error on your SanDisk USB drive could be caused by a physical write protection switch on the USB (some models have a small switch) or by software settings. Here’s how you can resolve it:

  1. Check for Write Protection Switch: If your USB has a physical switch, make sure it’s set to the “unlocked” position.
  2. Use Diskpart:
  • Open Command Prompt as Administrator.
  • Type diskpart and press Enter.
  • Type list disk and find your USB drive number.
  • Type select disk X (replace X with your USB number).
  • Type attributes disk clear readonly and press Enter to remove write protection.
  1. Format the USB: If the above steps don’t work, try formatting the USB in Disk Management (note: this will erase all data).