How to Fix: Can't Shrink, Partition Drive (C:\$Extend)

Dennis Faas's picture

Infopackets Reader Harry V. writes:

" Dear Dennis,

My Windows 10 PC recently updated, but got stuck in an automatic repair boot loop. Now it won't boot into Windows. To fix this, I created Windows Install media on a USB thumb drive using another PC, then I booted off the thumb drive on the broken PC and reinstalled Windows. I am now trying to partition the C drive into two partitions (C and D), with C containing only the operating system and D drive containing my user data. When I use disk management (diskmgmt.msc) to shrink the C drive, it tells me there isn't enough free space to shrink the drive - this is most likely because I have data scattered all over the C drive that isn't movable and therefore won't allow me to split the drive. I then tried using Auslogics Disk Defrag (using the 'optimize' feature) to move all data to the front of the C drive - and that's when I noticed hundreds of unmovable grey blocks in the Disk Defrag user interface. When I placed my mouse on top of one of the grey blocks, I see thousands of entries referencing the C:\$Extend folder. I have tried to delete this folder but all I get is access denied. How can I delete C:\$Extend so that I can shrink and partition the drive? "

My response:

I asked Harry if he would like me to have a closer look at this using my remote desktop support service, and he agreed.

Below I will discuss my findings.

How to Fix: Can't Shrink, Partition Drive (C:\$Extend)

After a bit of research into this issue, it appears that the C:\$Extend folder is part of the Windows NT file system structure. In short, this folder is not meant to be deleted and is controlled by the file system as well as the operating system.

Technically speaking, the C:\$Extend folder should not show up at all when using a third party defrag utility like Auslogics Disk Defrag; if it does, it suggests that your file system is corrupt and/or the drive geometry is corrupted. This is most likely why Windows got stuck in an automatic repair boot loop after updating.

It's also worth noting that if you have other hard drive partitions (such as a D Drive), it will also have an $Extend folder on it as well. Therefore it is not possible to take the C drive out of the system, attach it to another PC, then delete the $Extend folder on another PC in order to free up the space and partition the drive. This simply won't work.

Therefore, there is only one way around the issue depending on your circumstance:

Option #1: If the Drive Contains MS Windows

If you plan to reinstall Windows on this drive, you will need to backup all data on the drive, boot from Windows install media (from USB or DVD), delete all partitions on the drive during Windows Setup so that there only remains 'Unallocated space', then install Windows onto the unallocated space.

Once Windows is installed, you will be able to shrink and partition the drive accordingly using disk management (or another partition utility), and the C:\$Extend folder should no longer be a factor.

Option #2: If the Drive Does not Contain MS Windows

If you do not need to reinstall Windows on the drive, you can erase all partitions using disk management (diskmgmt.msc) or a third partition partition utility, then recreate the partitions accordingly.

Resetting the partitions in the manner I described is what fixed the issue for Harry.

I hope that helps!

Additional 1-on-1 Support: From Dennis

If all of this is over your head, or if you need help partitioning your drive / getting rid of the c:\$Extend folder, I can help using my remote desktop support service. Simply contact me, briefly describing the issue and I will get back to you as soon as possible.

About the author: Dennis Faas

Dennis Faas is the owner and operator of Infopackets.com. With over 30 years of computing experience, Dennis' areas of expertise are a broad range and include PC hardware, Microsoft Windows, Linux, network administration, and virtualization. Dennis holds a Bachelors degree in Computer Science (1999) and has authored 6 books on the topics of MS Windows and PC Security. If you like the advice you received on this page, please up-vote / Like this page and share it with friends. For technical support inquiries, Dennis can be reached via Live chat online this site using the Zopim Chat service (currently located at the bottom left of the screen); optionally, you can contact Dennis through the website contact form.

Rate this article: 
Average: 5 (6 votes)

Comments

billgruber_12965's picture

Would copying all the data to another drive (using something like, say, Acronis), then formatting the original drive and copying it back be a way around this?

Dennis Faas's picture

Even if you created a disk image backup with the intent of copying the data back after wiping out the original drive (presumably using robocopy), you would need to change the boot sequence in the BIOS and/or take the hard drive out and mount it in another system to achieve this. The reason being is that you can't copy files over like you suggest while the system is in use. Also there may be directory junctions that won't port over when you try to copy them. All of this would be way too difficult to do, plus no guarantee it would work.