Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 stackoverflow.com 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. –  R3TRI8UTI0N 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. –  SEARAS 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
add comment

3 Answers

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. –  R3TRI8UTI0N 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. –  R3TRI8UTI0N Jun 19 '12 at 3:01
add comment

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): LockerGnome.com
You can also watch this Youtube video.

share|improve this answer
add comment

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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.