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

Running NTFS, I have an old Vista install on a secondary drive that left a lot of files and directories behind that I am attempting to clean up. The files in question were writable for the old administrator user on Vista, but not the administrator user on Windows 7.

The obvious answer would appear to be to assert full control permissions by right clicking on properties and recursively assigning them. Unfortunately, I don't have permission to do that.

How do I delete these files?

share|improve this question
I feel like an obvious solution here since this is a secondary HDD to just >format d: /fs:ntfs /q after getting whatever files you were storing on it off. That will work pretty quickly and avoid a lot of file ownership headaches. – Catatonic27 Feb 12 '15 at 19:59

The administrator should be able to take ownership of files / directories, and then do anything with them starting with changing their permissions (actually DACLs). It certainly works under XP, but I haven't used subsequent versions of Windows.

share|improve this answer

Its easy.

Right click on the folder-> properties -> security-> advanced->owner - give ownership to your user, dont forget to click on Replace owner on subfolders.

Go grab a beer. It can take a while.

Then go on permissions (first tab) and again give yourself full control. Again recursive.

Then you should be able to delete.

share|improve this answer

Try running Disk cleanup wizard. It should have an option to delete the old windows installation.

share|improve this answer
The problem isn't the Windows installation, it's files that were installed under the old Windows installation. For example, Cygwin exists on the hard drive and I cannot delete all of the files under the old directory. – user4881 Nov 11 '09 at 3:05
hmmmm..... why don't you have permissions to take control? If you have admin permissions but not edit permissions, you should be able to change permissions. – Jim Deville Nov 11 '09 at 7:31

I am running into a similar issue. I have a disk from a laptop and want to clean it up. I connected it to my desktop and could not delete cygwin and its subfolders although I am in the admin group on the desktop. Even when running Explorer as Administrator.

Solution: right click on cygwin folder, choose Properties, then Securtiy tab, Advanced Security. On that dialog, choose the "ownership" tab. Edit ownership, and make it yourself. The problem was that the folder was owned by a user on the laptop, who no longer exists.

Make sure to check "replace ownership on subfolders and objects". Hit apply and let it run through the +100k files that cygwin has.

Is this enough? Unfortunately, frustatingly no! Then you have to go into properties, security, and edit,and allow delete on the folders. I just set Everyone to full control because I'm just trying to delete the freaking folder, for goodness sake. Also make sure that the change is propagated to all child folders and files.

Now, at last, I have removed cygwin files and folders from the drive. Next I will archive off some other things before deciding what to do with this old, but still usable drive.

share|improve this answer

You must log in to answer this question.

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