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 recently installed a new faster hard drive on my computer, and I am using the old drive as a secondary. I am running Windows 7 Professional, and it won't let me delete the Windows directory off of the old secondary drive. I even tried using RMDIR /s E:\Windows from an elevated command prompt. Same problem: access denied. Surely I'm not the first person to try this. How do I fix it?

share|improve this question
1  
Just download a Linux Live CD and delete it. –  ekaj May 24 '12 at 0:16
    
Have you tried taking ownership of the folder and removing the System attribute? –  user3463 May 24 '12 at 0:25
    
@RandolphWest: How would I do that? –  Jim Fell May 24 '12 at 0:28
    
takeown /F D:\Windows /R /A /D N and then attrib D:\Windows\*.* -S /s –  user3463 May 24 '12 at 3:18
1  
@JimFell Incase iti s a changing ownership thing, I see you ask how to do that. Come on jimbo, google for changing ownership of a file/folder. You'll find loads of links. Infact if you just googled the error message you'd probably see tons of links about it. I know when i've had an error removing a folder i've googled it and seen about changing ownership –  barlop May 24 '12 at 3:19

5 Answers 5

Download and burn an Ubuntu LiveCD http://www.ubuntu.com/

Then boot into that LiveCD (usually place the CD in the drive, restart your computer while holding down F12 )

The Ubuntu Distribution will take a little while to load, once it does it should recognize your internal hardrives. You can find more info here: http://www.psychocats.net/ubuntu/mountwindows

Just remove these folders through Linux.

rm -rf <path to directory to remove>

if this fails because of privileges try

sudo rm -rf <path to directory to remove>

Be warned, you should be absolutely sure you do not need these directories.

share|improve this answer
up vote 2 down vote accepted

I ended up reformatting the drive from an elevated command prompt, which effectively wiped out everything on the drive, including the Windows directory.

share|improve this answer

I installed a new solid state drive (SSD) pre-loaded with Win 7 Home Edition OS and my program files in the primary bay of my laptop . I plan to use the original HDD in the second bay of my laptop for data files. I had to clean out all the OS-related files and folders from this HDD and leave my existing data files intact.

I installed the HDD in the second bay of my laptop (it could be left outside and connected via a USB port) and tried to delete the OS files with Windows Explorer. The running Windows OS would not let me delete the system files. I tried several ways of changing permissions and none of them worked for me. So, I used a program called "PartedMagic",. The PM program gets loaded via a CD on power-up, before Windows boots, so Windows cannot invoke it's rules against deleting System Files.

Here's the short procedure: Download the PM program, save it, and burn it to a CD. Insert the CD and reboot the computer. Set the BIOS to boot from the CD. Among many other things, PM has a "Windows Explorer" like feature. Open it, navigate to the correct HDD and delete all the files and folders related to the OS. While you are there, delete any other unwanted folders and files. Defrag the HDD and your done.

Details left out of the short procedure:

Insert the CD created above into the CD tray and close it. Restart the pc. When the pc starts to boot up, press the ESC key (or f10 key) repeatedly to enter the BIOS. Set the BIOS to boot from the CD. Select "1", the default setting, on PM. After the program has loaded, click on the "Explorer" icon. Select the HDD you want to work on and start deleting. When you think you have removed all of the "undeletable" files and folders you "might" be done. Restart your computer. It should boot to the installed OS. If not, remove the CD and try again. Take a look at the HDD contents with Windows Explorer. You can delete unwanted non-OS data with WE.

OR,

I used another neat program that runs in Windows called WinDirStat to do a final clean up. Download and run the program. Select the drive you are working on. This program presents a great visual display of the HDD contents. Note: be patient, it takes WinDirStat a few minutes to crunch the contents and display it. Navigate around the colorful display and, when you are done deleting, run a defrag program. You are set go with lot's of space to store your data.

P.S. Please don't interpret anything in this procedure as disparaging toward Microsoft products. I like Windows 7.

share|improve this answer

You must take ownership and then grant yourself Full Control permissions to the folder.

Taking ownership only gives you the ability to change ACLs. Granting yourself permissions then gives you the ability to delete the files/folders.

share|improve this answer

As I recall you can do that using a boot disk

share|improve this answer

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.