A Microsoft file hosting and synchronization service.
You can consolidate C: and D: with Windows Disk Management only when both partitions are on the same physical disk and D: is immediately to the right of C:; first preserve D: externally, then delete D: and extend C: into the resulting unallocated space.
1. Check the physical disk and partition layout
- Right-click Start → Disk Management.
- In the lower pane, locate C: and D: under Disk 0, Disk 1, and so forth.
- Identify which situation applies:
- C: and D: are on the same disk, with D: immediately after C: use the procedure below.
- Another partition—often Recovery—is between them: Windows cannot extend C: across it.
- C: and D: are on different physical disks: they cannot be consolidated into one ordinary C: volume.
Windows requires the unallocated space to be on the same disk and immediately to the right of the volume being extended.^1^
2. Make two verified copies of D:
Deleting D: is destructive. Do not proceed based solely on seeing files in the OneDrive folder.
- Confirm OneDrive has finished syncing and shows no errors.
- For files needed in the external backup, right-click their OneDrive folder and select Always keep on this device. Wait until the files have downloaded; online-only files are not stored locally.^2^
- Connect an external drive with enough capacity.
- Copy, rather than move, all data from D: to that drive. Include Documents, Pictures, Desktop, Downloads, and any folders outside OneDrive.
- Open several copied files directly from the external drive and compare the folder sizes and file counts with D:. Microsoft’s external-storage procedure likewise calls for copying and verifying the files before removing the source.^3^
Do not delete D: until both the external copy and the required OneDrive content have been verified.
3. Disconnect OneDrive from D:
If the OneDrive folder is currently on D:
- Select the OneDrive cloud in the notification area.
- Select Help & Settings → Settings → Account.
- Select Unlink this PC → Unlink account.
- Leave the backed-up D: files untouched until the external copy has been checked.
Unlinking is the supported first step when changing the OneDrive folder location.^4^
4. Delete D: and extend C:
Perform this only if Disk Management shows D: immediately to the right of C: on the same disk.
- Close programs that use files on D:.
- In Disk Management, right-click D: → Delete Volume and confirm.
- Verify that its former space now appears as Unallocated directly after C:.
- Right-click C: → Extend Volume.
- In the wizard, select Next, use the maximum available space, select Next, and then Finish.
- Restart Windows and confirm that C: now has the expected capacity.
Disk Management is built into Windows 10 and Windows 11 and supports deleting, extending, shrinking, and managing volumes.^5^
5. Restore the data and reconnect OneDrive
- Create the desired folders on C: and copy the externally backed-up data into them.
- Start OneDrive and sign in.
- At the OneDrive folder-location screen, select Change Location.
- Choose a folder on C:, such as
C:\Users\<your-name>\OneDrive. - If that folder already contains the restored OneDrive files, select Use this location and allow synchronization to finish.^4^
- Verify the files before erasing the external backup.
If the layout does not qualify
- Different physical disks: Windows cannot extend C: with D:’s capacity. Copy the data to C: only if C: already has sufficient room, or retain D: as a separate data drive.^1^
- Recovery or another partition between C: and D: Disk Management cannot move that intervening partition. The supported choices are to retain separate volumes, back up and rebuild the disk layout, or use a reputable non-Microsoft partitioning application capable of moving partitions. Keep the external backup because moving partitions carries data-loss risk.^1^
- Extend Volume is disabled: check that the space is unallocated, directly after C:, on the same physical disk, and that C: uses NTFS or ReFS.^1^
References
- Extend a basic or dynamic volume
- Save disk space with OneDrive Files On-Demand for Windows | Microsoft Support
- [Windows 10](https://support.microsoft.com/windows/experience/backup-recovery/move-your-files-to-a-new-windows-pc-using-an-external-storage-device#back-up-files-from-your-current-pc-to-an-external-storage-device)
- Change the location of your OneDrive folder | Microsoft Support
- Disk Management in Windows | Microsoft Support