How to use DISKPART to clean and reformat the drive?


Most people faced the problem of disk corruption. There are several reasons for it. In this post I will explain how to deal and resolve it.

You may face data corruption isues for hard disks, pen drives, SD cards, etc... There are several formatting tools available over internet. But they may not work everytime. If the application fails in middle, disk might not be recoverable. We have a utility named "Diskpart", which is inbuilt in windows operating system. It works for most of the cases.

Diskpart is a command based utility which is used to manage storage devices,making volumes, partitions, and other disk utility features, which normal formatting softwares fails to work effeciently.

I will take you to the process to clean the disk, format it,give a label and assign a drive letter using command prompt.

IMPORTANT NOTE BEFORE GO NEXT:

We are going to erase everything on the disk. So disconnecct if any external dives are connected. Select the correct drive carefully to avoid unintened data loss. Make sure you have taken data backup.

Let's start the process. 

Connect the external drive which you want to format. 

Search "cmd" in the start menu. Right-click on command prompt and select open as administrator. Else, press Windows+X to open the power menu and select "Command prompt(Admin)".

Type the following command and press Enter:
diskpart

Type the following command to list all the available drives and press Enter:
list disk

Be careful here to identif correct disk, which you want to format. Identify by size and other parameters.

Use the following command to select the drive and press Enter:
select disk 3

Remember to change 3 in the command with the number of the drive you want to clean. If you fail to choose the correct number will erase all the data from the wrong drive.



Type the following command to clean the drive and press Enter:
clean

Type the following command to double-check the drive still selected and press Enter:
list disk

If the drive still selected, you will notice an asterisk (*) next to the disk.

Type the following command to create a partition and press Enter:
create partition primary

Type the following command to select the partition you just created and press Enter:
select partition 1

Type the following command to set the partition active and press Enter:
active



Type the following command to format the partition using NTFS and to set a label, and press Enter:
format FS=NTFS label=Softwares quick

Remember to change the "Softwares" in the command with the drive name you want to use.

Type the following command to assign a drive letter and press Enter:
assign letter=E

Remember to change E in the command with a letter you want that isn't in use by another drive on This PC.



Use the Exit command to close DiskPart to complete the task.

Open "This PC " from left sidebar in explorer or press Windows+E. Start using the new disk!!!


People also read...