iSumsoft » Resources »computer »Format Write Protected USB Drive Using CMD

How to Format a Write Protected USB Drive Using CMD

When attempting to format my USB flash drive, I find that it's unable to format, delete or copy new files to an or USB flash drive. Windows tells me that "The disk is write protected. Remove the write protection or use another disk." If you are running into the same error, you can try following steps to remove write-protection from USB drive, so that you can format your USB drive as normal.


Step 1: Scanning USB Drive and Remove Virus

Connect USB flash drive to computer, then navigate to the USB drive in Windows Explorer, right-click on it and make your antivirus software scan it manually.

scan-usb-virus

Once find virus, you remove and eliminate it using the antivirus software on your computer.

Step 2: Remove Write Protection via Diskpart Command Line Utility

Diskpart is a disk-partitioning tool that is built-in Windows and is accessible through the Command Line Utility. It provides you information about your partitions and volumes, allows you to delete and create partitions, extend NTFS volumes, etc.

1. Click on Start menu and type cmd in the search box, then right-click on cmd.exe and select Run as administrator.

open-cmd-as-administrator

2. Type in DISKPART and hit Enter.

diskpart-tool

3. Type in LIST DISK and hit Enter.

execute-list-disk-command

It shows two disks being available: the Hard Disk Drive (HDD) as Disk 0, and the USB flash drive as Disk 1.

4. Type in SELECT DISK 1 and hit Enter. It shows that Disk 1 is now the selected disk.

select-disk-1

5. Type in ATTRIBUTES DISK, hit Enter key. the you can see the first line Current Read-only State: Yes.

attributes-disk

6. 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.

attributes-disk-clear-readonly

Step 3: Format the USB Drive

The last procedure is to format USB drive, this action should make your USB drive be able to read and wrote. Before formatting USB disk, go to check what kind of file system it is, let's see how to do:

1. Go to Windows Explorer, right-clicked on the USB drive and select Properties. In General tab, you can see File system is NTFS.

to-view-what-file-system-of-usb

2. Close the Properties window and then right-click on USB drive again, click on Format.

execute-usb-formatting

3. In File system, select NTFS, and then click Start button.

start-to-format-the-usb-drive

4. When it prompts a warming dialog, just click OK to confirm this formatting.

confirm-to-format-usb

When it completed, click Finish. Then you can copy a small file to your USB drive. If it works, it would be great. More methods to fix USB formatting error you can refer to this article Fix Windows Couldn't Complete Format on USB Drive.