Windows Disk Management tool provides easy way to manage your hard disks. Since, Disk Management is a visual tool and most of them uses Command Based interfaces to see how Disk Management actions can be done using Command Prompt with the help of DiskPart and other command-line tools. However, in this page you will learn how to create, delete, format, defragment, checks your partitions for errors using Command Prompt directly.
Things to be considered before moving forward:
To perform the action as given in this page, you need to have administrative permissions and run the Command Prompt as administrator. Also, if you misuse the commands then there are chances of losing data. So, be careful and have backup before moving ahead.
Steps to create a partition using CMD
First, open the Command Prompt and then to access the Windows tool DiskPart, type diskpart. Once you launch DiskPart, you can establish HDD or solid state drive to create a new partition. Then select the drive using select command and view the available disks on your PC using command list disk.
Next, select the HDD you want to work and type select disk along with number of disks you want to use. To create a new partition, you need to use create partition command followed by the partition type and size. (The list commands that are used previously display the available free space on the HDD and the partition must be equal or less than the amount of available free space.
You can also assign a letter, format, delete, etc. using Command Prompt. Here are the steps to perform those actions.
Assign a letter to a partition
To assign a letter to a newly created partition directly from Command Prompt use the assign command like “assign letter = R”. So, that the letter will be visible in the File Explorer. But, before assigning a drive letter, you need to DiskPart and select the disk for which you want to assign a letter.
Format a partition
If you are unable to access a newly created partition then make use of command “format fs=ntfs quick”. Even this command should be used after DiskPart and select the disk you want to format. Once, you complete work with DiskPart, type the command exit to close the program.
Delete a partition from Command Prompt
To delete a partition, first open DiskPart then select the partition you want to delete and type the command delete partition. For this, select the disk to be deleted and run the delete command.
Checks disk for errors
For this, type chkdsk command followed by the drive’s letter.
For instance, if you want to scan D: drive for errors, type chkdsk /f d : and press enter and start scanning. From this process, you will get to know, amount of disk space the partition has used, how many files are used, available free space, identifies bad sectors, etc.
Defragment a disk
To defrag a disk, all you have to do is type the command defrag followed by the drive’s letter.
For example, to defrag drive F, type “defrag f:” If everything is ok then you will get a report which contains information like volume size, total fragmented space, free space and so on.
Well, while Command Prompt to perform above actions if you come across loss of partition data then download, install and run Remo Partition Recovery tool. This tool provides step by step procedure and provides hassle free data recovery. With this tool, you can recover deleted partition data also lost, formatted partition data on all the latest versions of Windows and Mac OS.