We’ve all been there before. Just minding your own business, trying to copy some files to or from your USB flash drive and then your computer flags you with, “The disk is write protected!” at the most inconvenient time. If you’ve ever been perplexed as to what this means or how you can get rid of it, we have the answers.
What is write protection?
First of all, what even is write protection? Write protection is any mechanism that prevents you from modifying or erasing data on a device. With this feature, you won’t be able to accidentally or purposefully change or erase data while it is enabled because it is in read-only mode. Write protection is ideal for companies who send out discs, drives, or (back in the day) floppy disks with corporate software or information. The write protection ensured employees or recipients of promotional materials couldn’t erase (either purposefully or accidentally) the data. It’s also handy if you’re prone to second guessing yourself and are dealing with lots of important files containing sensitive information that absolutely should not be erased or modified.
The mechanism for write protection can be physical or it can be based on software. Some flash drives have a physical switch to turn this feature on or off, effectively “locking” you out of writable actions by changing files into a read only mode. SD cards also often have this physical locking ability. Quite often though write protection is enabled via software on the drive itself.
Sometimes, the physical switch to enable this feature will be clicked into the “lock” position accidentally while inserting the drive into the port. So, a first step when you get that error message it is to check if the switch is in the correct position.
If this physical switch isn’t the problem though, and you haven’t enabled write protection yourself but your computer is peppering you with notifications, then what do you do?
How to remove write protection from your USB Drive
As mentioned previously, if your flash drive uses a physical switch to enable write protection, simply turn it off. Most newly manufactured drives don’t bother with this mechanism anymore, however.
If you don’t have a physical switch, then you need to check a few things before getting removing the write protection.
- Check USB drive for viruses. Viruses can make your drive act wonky and cause your drive to react with a write protection error. Use your explorer option (Windows Explorer for Windows, for example), right click, and then initiate a manual scan for viruses.
- Make sure the drive isn’t full. Sometimes if you’re trying to manipulate something with your USB drive, the write protection error will pop up if it’s full. Simply right click on the drive in your explorer and click Properties to pull up your current capacity.
- Remove individual files with write protection. Occasionally, a single file may be write protected. This will instigate a different error message but it’s annoying, nonetheless. Find the file, right click and select Properties. The Read-only box located under Attributes should be un-checked.
- Check filenames for excessive character length. Files with long filenames (like, over 255 characters) are a nightmare and are inherited from Window’s versions of the past (we’re talking Windows 95 over here). These are corrupted files and need to be deleted but you won’t be able to do that because the file name is so long. Here’s what you do instead:
How to delete a long file name (Windows)
- Open the file folder where the file is located. Press Shift and Right click on an empty area, then select “Open command Window here”
- Note: Windows 10 doesn’t always have the “open command window here” option available; sometimes it will be labeled something differently
- Enter the DOS command: dir /x
- If you have a lot of files to sift through, you can use dir /x /p to pause and move between screens to look through all the files.
- Find the filename which will be auto shortened by DOS and enter the command to delete it: del (filename) and you’ve deleted the errant file!
You could try reformatting the drive, but that’s really a last resort option because it will wipe your data. If you’re absolutely sure that your data is secure and copied somewhere else, reformatting the drive should allow it to become readable and writable and remove the necessity of buying a whole new drive. You can learn how to easily reformat your USB drive from our blog!
To remove Write Protection from your USB drive using Diskpart:
This is an easy non-software method for removing Write Protection. Also, it’s available on all Windows type computers so you don’t need to worry about your version having it or not. It is a more thorough and involved way to format your drive than the how to reformat your drive blog we provided above. Note that this will format your drive and therefore will wipe your data.
- Open the command prompt either by searching for cmd.exe or command prompt in the start menu (you may need to run as admin; you’ll know if you do if you get an “access denied” alert…just right click on Command Prompt and select “run as administrator”)
- Type “diskpart” and enter
- Type “list disk” and enter
- Type “select disk x (x is the number of your non-functioning drive) and enter
- Type “attributes disk clear readonly” and enter
- Type “clean” and enter
- Type “create partition primary” and enter
- Type “format fs=fat32 (you can use ntfs instead of fat32 if you’re only going to use the drive with Windows computers) and enter
- Type “exit” and enter
Your drive should work now. If it doesn’t, then there’s nothing else you can do in this situation. Luckily drives are cheap.
What to do if my USB drive is corrupted or physically broken?
Unfortunately, you’re out of luck here and the write protected error message is the least of your problems. There isn’t anything that you can do about corrupted or broken drives except get a new one and hope that you can recover the deleted files in some way. You can learn more about broken flash drive data recovery from our blog.