Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I got a new SSD drive for my computer, and have installed Windows on this drive. This left an old Windows directory on my old normal drive. I am now attempting to delete this old Windows directory, but am getting blocked by security. If I crawl down into each subdirectory, I can manually change the ownership and access rights for each file, but if I attempt to do it from the root directory, I get a "Failed to enumerate objects in the container. Access is denied" error.

I have tried logging in as local Administrator, but this had the same effect.

I figure that I am missing something stupid, but I just can't determine what it is.

share|improve this question

migrated from Jun 19 '12 at 2:47

This question came from our site for professional and enthusiast programmers.

Have you tried using the command prompt with admin privileges to delete it? Sometimes Windows Explorer has issues with stuff like that, and for some reason the cmd works. – DiscoveryOV Jun 19 '12 at 2:54
@DavidMullin, If you want, I can tell you a way to login as the SYSTEM user, which can access everything (even to the SAM file). Then you'll have ALL privileges to remove that folder. – Searush Nov 6 '12 at 12:17
Use disk cleanup. run as admin. clean up system files. old windows installations. i'll give a detailed answer later in case you're unable to do it – pratnala Nov 6 '12 at 12:43
up vote 1 down vote accepted

You can use unlocker to delete the windows directory. Just install it and it will appear int the right click context menu.

enter image description here

enter image description here

You can also use boot delete which has the ability to delete the files at the boot time.

share|improve this answer
Aw man, I have that installed and I didn't even think of using that as an option for answer. Oh well. – DiscoveryOV Jun 19 '12 at 2:56
@R3TRI8UTI0N who thinks buddy its what the stuffs work when we are in trouble. I didn't recommend him command prompt as some time it also refuses. – avirk Jun 19 '12 at 2:58
Yeah, notice I didn't make it an answer though, only a comment, because I knew it sometimes doesn't work either. And I can't read your first sentence. – DiscoveryOV Jun 19 '12 at 3:01

It can be deleted with the Disk Cleanup utility. Do the following:

  1. Type disk into the Start menu search (or on the Start screen, if using Windows 8)
  2. Select "Disk Cleanup"
  3. Select the drive your Windows.old folder is on
  4. Click "Clean up system files"
  5. Check the "Previous Windows installation(s)" option and click OK

Source (with screenshots and detailed instructions):
You can also watch this Youtube video.

share|improve this answer

I found a solution that works for the Failed to enumerate objects in the container. or permission errors in Windows 8.

Follow the steps bellow:

  1. Download and install Unlocker.
  2. VERY IMPORTANT, when you install Unlocker there will be an option to have it in the context menu, leave it checked.
  3. For people that have problem deleting files (ex. Windows.old or some other files) and don't have permission, just right-click the folder you want to delete, choose Unlocker and from the new Windows dropdown list choose "Delete" and click "OK" and it's gone.
  4. For people who want to regain ownership over a folder, folders, files, just right-click them, choose Unlocker and from the dropdown chose "Move" and select a path that you have rights to. This will move all the content from one place to another at the end you will have full permission to the items.
share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .