How do I merge two unallocated, non-sequential partitions on the same logical disk?

I'm wondering if I could merge two unallocated spaces as shown in the picture below:

Screenshot from Disk Management

I would like to combine the two unallocated spaces into a single space for further partitioning.


Since it's in a primary partition surrounded by unallocated space this should actually go pretty easily.

  1. Ensure you make a full backup.
  2. Get a disk partitioning utility. Personally I like to use a LiveCD of GPartEd.
  3. Use it to move the D: partition around to where you want it (slide it to one end of the unallocated space or the other kind of thing).
  4. Apply changes, and take a nap while it applies them (could take many hours to complete).

Example/general UI picture of GPartEd:

enter image description here