Dec 21, 2020 • Filed to: USB Recovery • Proven solutions
How do I remove write protection from a SanDisk flash drive?
Hello all, I got a message reading 'The disk is write-protected' whenever I inserted my SanDisk pen drive to my computer. I was unable to disable the write protection on my flash drive. Can anyone help me? Thanks.
What Is a Read-Only Flash Drive?
Under Device, select the USB flash drive you want to format and use. Under Format Options, check Create a bootable disk using, click/tap on the browse icon to navigate to and select your 64-bit Windows 7 or Windows 8 or Windows 8.1 ISO file, and then make sure that Standard Windows installation is selected (dotted). Method #1: Wipe USB Flash Drive by Using In-built Format Option. All Windows and Mac computers comes with an in-built format disk option to erase everything from a USB flash drive. We will show you how to use this feature as your advantage to make sure everything is deleted permanently.
Once you get similar messages like the following ones when using the SanDisk flash drive, it means the pen drive becomes read-only and write-protected. You're unable to edit data, delete files, or save information on this drive, unless you find the fixes.
- The common error of 'The disk is write-protected' will occur when you trying to format an external disk such as (USB flash drive, SD memory card, or pen drive).
- If you start to copy or modify the files on the drive, the pop-up window show you 'The disk is write-protected. Remove this write-protection or use another disk'.
- A read-only flash drive won't allow you to copy the file. When you want to do that, a message might appear - 'You cannot copy files to the volume'.
Why Is My USB Drive Read Only?
Formating the file system of the flash drive can cause the write protection. Usually, a pen drive uses the NTFS file system on a Windows computer. You can keep writing and reading data stored inside it. However, sometimes you might want to use it on a Mac computer. So you format the flash memory stick to make it compatible with the Mac computer. The file system is indeed readable and the stored data is accessible on a Mac computer due to the Mac feature. However, writing data is not available. The write protection is added on the USB flash drive by default.
How do I disable write protection on a flash drive? Here, we offer both Windows and Mac solutions to help you fix write-protected flash drives easily and quickly.
How to Remove Write Protection from USB Flash Drive on Windows
How do I remove write protection from a USB drive in Windows 10?
If your USB disk gets this error on Windows computer, you may think the USB drive is broken and unable to use. The flash drive becomes a read-only situation, and you cannot manage data on it, like copying, deleting or writing the files on the disk. How to remove the write protection from a read-only flash drive? On the next guide, we will show you how to disable write protection from flash drive, SD card or pen drive in Windows 10/8/7.
Solution 1: Diskpart Command
- Step 1. Connect your flash drive to the computer, and launch a command prompt by searching for cmd.exe or 'Command Prompt' in the Start menu.
- Step 2. Type the following and press Enter after each command: diskpart, list disk, select disk #(# means the name of your write-protected disk), attributes disk clear readonly, clean, create partition primary, format fs=ntfs.
- Step 3. Exit the Command Prompt.
After this, your USB flash drive should now work well. If it doesn't work, you can also follow the next steps to fix write-protected USB drive with Regedit.exe.
Solution 2: Regedit.exe
- Step 1. Press key of Windows Key + R and type regedit in Run dislog box and Enter.
- Step 2. On the pop-up window Registry Editor, go to the HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlStorageDevicePolicies.
- Step 3. Double click the WriteProtect value in the right pane.
- Step 4. You can change the value data from 1 to 0, then click OK to save the change, and close the Regedit window.
- Step 5. Restart your computer and connect the USB drive to it. Check if the drive is working well and no longer write-protected. If it isn't read-only now, you can continue using the USB flash drive.
Solution 3: Open Windows Explorer
- Step 1. Plug in the write-protected disk.
- Step 2. Press 'Windows+E' and right-click on the drive.
- Step 3. By right-clicking on the disk, you can choose 'Properties', and then select 'Security'.
- Step 4. To Edit the permissions, you should now select 'Everyone' from 'Group or user names'.
- Step 5. Select 'Edit' and go to 'Permissions'
- Step 6. Check all the boxes labeled as 'Allow'
- Step 7. Click 'Apply' and exit. Your disk's write protection has now been removed.
Solution 4. Check and Unlock USB Flash Drive
- Check the switch on the drive: some external USB flash drives and pen drives have a mechanical switch which is used to lock or unlock the drive. If your drive gets the switch, check whether the switch is locked or not. If yes, move it.
- You also can check the USB flash drive if it got the virus-infected and attacked. You need to download anti-virus software and scan your flash drive. Once the virus is found, and kill it at once to remove write protection from a read-only flash drive.
How to Remove Write Protection from USB Pen Drive on Mac
If you're working on a Mac computer, you also will receive the 'Read Only' error on the external drive. On the following steps, we will show you how to disable write protection disk on Mac.
Solution 1: Format Write-Protected Pen Drive on Mac
To disable the write-protected disk on Mac, you can follow the next steps to format the drive on macOS:
- Step 1. Open the Disk Utility, and the application window will open.
- Step 2. Click on your USB flash drive on the left pane of Disk Utility.
- Step 3. Click on the Erase tab, then select the format type. Select either 'MS-DOS File System' or 'exFAT' both working well on Windows and Mac.
- Step 4. Then click on the 'Erase' option to start formatting the USB flash drive.
Solution 2: Fix and Repair Permissions
Check if the drive's permissions are corrupted or not. You can fix the error using Disk Utility. Follow the steps below to remove write protection from Read-only USB drive on Mac.
- Step 1. Go to the Disk Utility in the Utilities folder.
- Step 2. Select the device which is ready-only need to remove write protection.
- Step 3. Click on the First Aid and the OS will start to scan your drive.
We hope those solutions could help you fix and remove write protection from USB drive on Windows and Mac. If it still fails to fix out the problem, you should buy a new USB flash drive. Also, if you need to get all USB data back, you can download Recoverit Data Recovery, powerful USB data recovery software, to help you out. Follow the guide to recover files from USB drive easily.
USB Topic
- Recover USB Drive
- Format USB Drive
- Fix/Repair USB Drive
- Know USB Drive
Shortcut Virus is a very common virus that converts files and folders into shortcuts mostly in flash drives/pen drives/SD cards or similar ones. One of the ways on how to remove shortcut virus from USB flash drive is through Windows Command Prompt or CMD.
A shortcut virus spreads very fast. First, it’s going to hide your files and create a shortcut. Since you have no other way to access your important files, you have to click the shortcut file. After you click that shortcut, it replicates and hides more of your files and folders. In the later part of the shortcut virus infection, accessing your files is not possible anymore, corrupting them or the worst case scenario, stealing your personal information.
The USB flash drive or pen drive might be infected with shortcut virus when you used it to transfer data from other infected computer. It is also possible that its from the infected file you have downloaded online and copied into your USB flash drive/SD card.
The best solution for this is to format your USB flash drive. And no, you don’t want to do that since it contains your important files, projects, presentations, thesis, accounting reports, etc. which you have spent plenty of hours to finish. In this case, you just have to remove the shortcut virus in your USB flash drive using the cmd or command prompt.
You might probably think this is something “techy” but don’t worry. It’s really easy. This is not just to help you with your shortcut virus problem, I’m teaching you to be a hero for your classmate/workmate who are dealing with this problem in critical situations.
Steps on How to Remove Shortcut Virus from USB Flash Drive Using CMD
1. Connect the USB Flash Drive to a computer.
When you connect your infected USB flash drive to a computer, don’t open it. This is the mistake of most users. When you open it, a big possibility that the computer will be infected by the shortcut virus, too.
2. Open the Windows Command Prompt or CMD.
Windows Command Prompt is a command line interpreter application used to perform advance administrative functions of Windows operating system. To open command prompt, click the Start Button + R. Then, type cmd and press Enter.
3. Determine the USB Flash Drive letter.
Every drive connected to a computer is assigned a single alphabetic letter or commonly referred to as drive letter. These drives can be viewed in the Computer Folder. To determine the USB Flash Drive letter, go to Start and click Computer (or My Computer). You can probably see Local Disk (C:), Local Disk (D:) or DVD RW Drive (E:) or more. Check the drive letter of your USB Flash Drive. Example: F:, G:, H:, …
4. Enter the command to delete shortcuts.
Since the Shortcut Virus created a lot of shortcut, you may want to delete them all first. This will not delete your original files though, just the shortcuts. Assuming the drive letter of your USB Flash Drive is letter F. In the command prompt or cmd, type F: then press Enter. The next commands will be executed solely in the USB flash drive. To delete all the shortcuts, type del *.lnk then press Enter.
A brief explanation with the command, the del How to beat freddy in fnaf 1. means delete. The *.lnk means all link files(shortcuts). The computer interprets it as “delete all link files” then when you click Enter How can i get sims 4 on my laptop. , it executes the command.
5. Enter the command to change the file attributes back to original.
To make the attributes of the original files back to normal, type this code attrib -r -s -h /s /d *.* then press Enter. This command line removes the read-only, system and hidden attributes assigned to files. This may take few seconds or minutes but wait till the cursor start blinking again. That’s it! Check your files.
How To Clean A Usb Flash Drive On Mac
If you want to dig deeper with the commands:
- attrib : allows users to change the attribute of the files.
- – : sets an attribute.
- + : clears an attribute.
- r : read-only file attribute.
- s : system file attribute.
- h : hidden file attribute.
- s/ : Applies attrib and any command-line options to matching files in the current directory and all of its subdirectories.
- d/ : Applies attrib and any command-line options to directories.
If you want to learn more about these commands, visit Microsoft command-line reference.
Clear Flash Drive
That’s how to how to remove shortcut virus from USB Flash Drive using CMD or command prompt. I hope it worked in your end. If you have some questions or additional useful information, do let us know via comment below.