I'm running Windows XP and I have two disk partitions, C and D. C contains Windows and installed programs, and D has my own files, documents, etc.
I'm wondering if its possible to combine C and D into one partition?
You can combine the partitions into one. However, if you combine them, you will lose the contents of the D: drive. If you can backup the contents of D:, then you can use a program like the Gnome Partition Editor to remove the D: partition and then resize the C: partition to add the free space that is left.
It is very much possible to merge adjacent partitions on the same physical drive and using the same file system (FAT32, NTFS etc.) without any data loss (although of course you should always have an up-to-date backup before messing with partitions). GParted can't do it (although people have been requesting the feature for years now), but other programs can.
Partition Magic 8.x from Symantec could do it easily (although they killed a great product after buying it, the final version was fully compatible with XP). The source partition ended up as a folder inside the destination partition.
Now I recommend EaseUS Partition Master Home Edition which is free and can accomplish the same thing:
Another option would be to mount the D drive as a folder.
A partition can be mounted as an empty NTFS folder either by adding a new hard disk to your computer or if your existing disk has an unused partition available, and following the steps below:
Start » Run
and type diskmgmt.msc (opens Disk Administrator)Read the full instructions or this Microsoft KB article
I needed this task too and tried Microsoft Disk Management of Windows 10 first. It has a function called "merge", but it didn't work. I think it has something to do with dynamic disks.
I decided to copy all files from the smaller partition over to the larger partition, then delete the smaller partition and then extend the size of the remaining (larger) partition to be the only partition spanning over the whole disk. But Disk Management wasn't able to do it without converting the layout to dynamic disks. The reason was that the remaining partition was the second one and the free space was in front of this partition.
I did not try DISKPART, but from what I read here both tools, Disk Management and DISKPART, are not designed to extend in front (I quote from the source, description of value "extend"):
So I ended up using EaseUS Partition Master, free edition (for private use), and it did the job successfully and quite fast too: it took only 2 minutes on a PC with a 2.13 GHz Core 2 Duo processor, 4 GB RAM and a SATA-II HDD. (The copy operation from the smaller partition, 60 GB with about 40 GB of data, to the larger partition, the rest of a 320 GB SATA hard disk drive, took about 4½ hours.)
The partition is now extended in front to span over the whole disk. It seems like the NTFS filesystem structures where modified to NOT move any actual data, which is why it only took 2 minutes, and is exactly what I wanted. Naturally there is now free space at the start of the partition and it is likely that additional fragmentation will occur. Eventually that is, because new files will be placed in front of the remaining data and at one point it will fill up that free space in front, fragment, and continue behind the already existing (old) data the end. But that's just my paranoia talking...