But … yes.
There are ways of doing what you ask; just not as simply as your question implies.
Become a Patron of Ask Leo! and go ad-free!
A partition is just a way to sub-divide a hard disk into fixed areas. In the example disk above, you can see that my one-terabyte drive is divided into five partitions, ranging from 650 megabytes to almost 940 gigabytes.
Each area is a fixed size, meaning the space used is what it is, regardless of whether or not there are actually any files there. This differs from folders in that a folder takes up only the space of its contents, plus a little overhead.
Partitions are generally treated like disks — in fact, the “C:” drive on my system is simply one partition among the others. The others don’t have drive letters attached, but they’re still treated as independent disks.
Deleting a partition
Deleting a partition is very similar to deleting a folder: all of its contents are deleted as well. Just like deleting a file, the contents can sometimes be recovered using recovery or forensic tools, but when you delete a partition, you’ll delete everything inside it.
That’s why the answer to your question is “no” — you can’t just delete a partition and keep its data.
You need to take additional steps.
Back up and restore
One way to retain the data in a partition prior to deleting it is to back it up.
Backing up — either by making an image of the partition or copying all the files it contains elsewhere — ensures that no data is lost when the partition is deleted. You can then restore the files — again, either from the image or by copying the files from wherever they were kept — to wherever you want them to live after the partition has been deleted.
Honestly, before you go playing with partitions on a hard disk, I recommend taking an image backup of the entire disk anyway. As a side benefit, you can recover/restore the files for this partition from that.
Growing an adjacent partition
Typically, when people ask this question they’re in a situation like this:
- One partition has a lot of files and is quite full — usually the C: drive.
- Another partition on the same drive has some files, but is not full. Often this is the D: drive.
- The person asking wants to get rid of D: and allocate all its space to C: without losing any of its files.
The process then turns out to be fairly direct.
- Back up the entire hard disk for safety.
- Copy the files from D: to C: if there’s room.
- If there’s no room, copy the files from D: to an external hard drive or some other location.
- Delete the D: partition.
- Extend the C: partition into the space freed up by deleting D:.
- Copy the files back, this time to the newly expanded C: partition.
Deleting and extending partitions can often be done with Windows own built-in disk management tool. If not (perhaps you’re running an older version of Windows, or the partitions are laid out in a sequence that the Windows tool can’t cope with) there are third-party tools that can do the job.
Save the data!
The bottom line here is simple: deleting a partition deletes everything within it, but that’s easily handled by making a copy of the data elsewhere first. Then you can restore that data whenever, wherever, and however you like.
Subscribe to Confident Computing! More confidence & less frustration -- solutions, answers, & tips -- in your inbox every week.
I'll see you there!