How to Extend C Drive with Diskpart cmd in Windows 10/11

by John, Updated on: October 23, 2022

When C drive is getting full in Windows 10/11, it is better to extend C drive than starting from scratch. If you don't want to use any software, diskpart is an option. However, this native tool has many disadvantages. To use it, your disk partition configuration must meet the requirements. In this article, I'll introduce how to extend C drive with diskpart in Windows 10/11, and the disadvantages of Diskpart command to extend C drive in Windows 10/11 computer.

What is diskpart command

Diskpart is a command-line utility used to manipulate disk partitions in all versions of Windows clients and Windows Server beginning with Windows XP and Windows Server 2003. This utility adds capability to the Windows Disk Management snap-in. Users can type Diskpart commands directly to configure storage, or script Diskpart to perform multiple commands via a text file script, such as create, delete, format partition, convert basic disk to dynamic.

How to run Diskpart in Windows 10/11

There are two ways to run diskpart command in Windows 10/11 laptop, desktop and tablet computer:

From cmd

  1. Press Windows and R on the keyboard to open Run.
  2. Type diskpart and press Enter.

Locate file

  1. Open C:\Windows\System32
  2. Double click diskpart.exe

Precondition to extend partition with Diskpart

To extend partition with diskpart command in Windows 10/11, your disk partition configuration must mee the requirements:

  1. This partition must be formatted with NTFS file system.
  2. There must be adjacent Unallocated space on the right of this partition.

Although diskpart has shrink command, it can only make Unallocated space on the right when shrinking a partition. After shrinking D drive, Unallocated space is on the right of D instead of C. When you increase C drive with extend command, you'll receive error message 'There is not enough usable free space on specified disk(s) to extend the volume.'

To extend C drive in Windows 10/11 with diskpart command, you must delete the adjacent D drive in advance. Only when there's adjacent Unallocated space on the right of C drive, diskpart extend command is valid.

Note: if you installed programs or any services to the adjacent partition D, do not delete it. If you decide to delete it, remember to transfer files in advance.

How to extend C drive with diskpart in Windows 10/11:

Step 1: Type list volume in diskpart command prompt window and press Enter, you'll see all partitions but no Unallocated space.

List volume

Step 2: Type select volume 1 to give focus to the system C: drive.

Select volume

Step 3: Type extend to proceed extending.

Extend volume

If you extend C drive again, you'll receive error message 'There is not enough usable free space on specified disk(s) to extend the volume.' Because there's no adjacent Unallocated space this time.

Cannot extend

Limitations of diskpart to extend C drive in Windows 10/11

  1. Only when there's adjacent Unallocated space on the right, extend command is valid. Diskpart cannot make such space when shrinking other volume.
  2. Only NTFS partition is supported to shrink and extend.
  3. Unallocated space is not displayed in command window, so you don't know whether there is and where it is.
  4. Volumes are shown as list without structure.
  5. Operations cannot be undone, incorrect operation could cause data loss.

To enlarge C drive space, NIUBI Partition Editor is better choice. It has free edition for Windows 11/10/8/7/Vista/XP home computer users. To resize and extend partition, you just need to drag and drop on the disk map. 

Download the free edition, you'll see all disks with partition structure on the right, available operations are listed on the left and after right clicking.

Main window

Step 1: Right click D: drive and select "Resize/Move Volume", drag left border towards right in the pop-up window.

Shrink D

Then part of unused space is converted to Unallocated on the left side of D.

Shrink D rightwards

Step 2: Right click drive C and select "Resize/Move Volume" again, drag right border towards right in the pop-up window.

Extend C drive

Then C drive is extended by merging the Unallocated space.

Extend volume C

This software is designed to work in its virtual mode, all operations you do will be listed as pending for preview. So if you did something wrong, simply click Undo to cancel. To change real disk partitions, click Apply to execute.

Watch the video guide how to extend C drive in Windows 10/11 computer:

Video guide

Besides resizing and extending disk partitions, NIUBI Partition Edition can help you do many other disk/partition management operations, such as merge, copy, convert, defrag, wipe, repair, scan, set Active partition, etc.