How to Format a Write Protected USB Flash Drive Using Command Line

32GB of sweet USB flash drive storage space just sits in your office drawer, ironically taking up space. Why? Because you can’t put anything else on it. It’s write protected and you can’t format the stupid thing! Or can you? We get a lot of people asking about formatting write protected USB flash drives.

Remove Write Protection With Diskpart Command Line Utility

Click on your Start Menu and type cmd in the Search for programs and files field. It should show up at the top of your Start menu. Right-click on it and select Run as Administrator.

You should now see the Command Line Utility, which looks like the following.

Type in the command DISKPART and hit Enter. Diskpart is a disk-partitioning tool that is built into Windows and is accessible through the Command Line Utility. With it, we can change the values associated with your USB drive.

Now type LIST DISK and hit Enter. You should see a table something like the one below. It shows two disks being available: the Hard Disk Drive (HDD) as Disk 0, and the USB flash drive as Disk 1. We know that the USB flash drive is Disk 1 because it is much smaller than Disk 0 at only 7441 MB versus 298 GB. Be very careful from here on out! You can see that if you start working with the wrong disk, things can get ugly quicker than when the lights come on at last call.

At this point, type SELECT DISK 1 and hit Enter. You’ll be rewarded with the knowledge that Disk 1 is now the selected disk. Type in ATTRIBUTES DISK, and Diskpart will tell you what you want to know about your flash drive. Most important is the first line Current Read-only State: Yes. This lets us know that, indeed, the flash drive is write protected.

To remove the write protection with Diskpart, type the command ATTRIBUTES DISK CLEAR READONLY. If it works, that will be confirmed by the line Disk attributes cleared successfully.

Double-check this by trying to copy a small file to your USB drive. If it works, great. If you still get the write-protect error, it’s time to bring out the big guns. Software utilities.

 

Related posts

How Open-Source Tools Can Help Keep Your Computer Secure

How to Evaluate and Choose the Best Web Hosting Service

How to check suspicious links fast?