DiskPart is a disk partitioning tool that you can use within the Command Prompt in Windows. So with this tool you can partition your disks or simply assign new letters to portable drives. Consequently, it’s an alternative to the Format and Disk Management tools.
To open DiskPart, you must first launch the Command Prompt in Windows 10. Press the Win + X key, and then select Command Prompt (Admin) from the menu. That will open an Administrator: Command Prompt window as shown in the snapshot below.
Next, type ‘diskpart’ into the Command Prompt and press Enter. Then you should see a DISKPART command line on the window. Type anything there and press Enter to open a list of DiskPart commands as shown in the snapshot below.
Those are all the options you can enter into the DiskPart. For example, you could assign a new letter to a USB drive. First, close the Command Prompt and insert USB stick. Then reopen the Command Prompt and DiskPart as before, enter ‘list volume’ and press Return key. That will open a list of your disk volumes as directly below.
There’s only one removable volume, which is your USB drive. In the example above the removable drive is volume 4, so enter ‘select volume 4’ if that’s also your removable drive. However, your USB stick might not have the same number. Press Enter to select that volume as below.
Next, enter ‘assign letter = R.’ Or you could substitute the R with any other alternative letter for the drive. Press Enter to assign the new drive letter.
Now you’ve effectively given your USB drive a new letter. Enter ‘storage’ into Cortana’s search box and select Storage. Note your portable USB will now have a new drive letter.
That’s just one thing you can do with DiskPart. You could also use it to partition and format an entire USB drive. To create a multipartition layout for a flash USB drive, first type in ‘list disk’ and press Return. Type ‘select disk 1’ (or whatever disk number the USB is). Enter ‘create partition primary’ and press the Return key again.
Also see our article How To Fix the ‘User Profile Service failed the logon’ error in Windows
Next, you can format the USB by entering ‘select partition 1’ (press Return) and ‘active’ (press Return) to set the partition active. Type ‘format FS=NTFS label=WC-Drive quick’ into the Command Prompt and press the Enter key. You can substitute WC-Drive with an alternative label title.
Note that DiskPart doesn’t have any undo options. So be careful when partitioning and formatting drives with it. It’s just one of numerous tools you can partition and format drives with.