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.

This question already has an answer here:

I have a folder that I am unable to delete.

I also cannot take ownership.

The hard drive is one I have previously used in another PC, if this makes any difference.

When trying to take ownership it says it cannot display the current owner and when trying to take ownership selecting any group says access denied.

I've also tried via the command line using takeown however this too says Access Denied.

Windows 7, and I am logged in as an administrator.

share|improve this question

marked as duplicate by Arjan, Heptite, Tog, Kevin Panko, Mokubai Apr 27 at 17:41

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
If you need to delete it and Windows is not allowing you to do so, boot from a Linux Live CD/USB and get rid of the folder. –  Karan May 5 '13 at 20:27
    
Is it on an external drive? USB or similar? –  Burhan Khalid Jan 30 at 14:40

2 Answers 2

  1. Download PsExec.exe from Sysinternals, this tool allows you to open a command prompt under LOCAL SYSTEM privileges: http://live.sysinternals.com/psexec.exe (put it in C:\temp)
  2. Open a command prompt with Administrator Privileges
  3. CD into C:\temp
  4. Run: psexec -s -i cmd.exe, this installs a temporary service which will open a command prompt under LOCAL SYSTEM account. The service will be automatically deleted after you close the screen (i.e. after EXIT)
  5. Run: TAKEOWN /F <folder> /R /D Y, this will set the Administrators group as owner, it also recurses into the folder 6.To give the Administrators group full control rights, run ICACLS <folder> /grant administrators:F /T, the /T indicates that this operation is performed on all matching files/directories below the directories specified
share|improve this answer
    
Thanks, but it still says Access Denied when trying through the cmd prompt opened by psexec –  fileperms May 4 '13 at 16:04
    
Which part says acces denied? TAKEOWN or ICACLS? –  Heebr May 4 '13 at 16:31
1  
Could be it's locked by some process. Take a look at link if there's something you can use. –  Heebr May 4 '13 at 16:40
    
takeown says Access Denied. Additionally the folder is not in use by anything (I had read that question earlier and Unlocker finds nothing). –  fileperms May 4 '13 at 18:26
    
Is the folder read-only? Maybe a ATTRIB -R -S -H <folder> will help? –  Heebr May 4 '13 at 19:24

Have you tried Unlocker? It's free. Just Google it. I worked like a charm for me when all other attempts were tried: http://www.majorgeeks.com/files/details/unlocker.html

share|improve this answer
    
Did you download it from there? That version is a lot bigger (1M vs 393kB) than the version from the author's site emptyloop.com/unlocker, and people complain about software that is installed along with that program. (But even the much smaller install from the original site includes "Promotional feature: Fully optional Delta toolbar".) –  Arjan Apr 26 at 16:46
    
(As an aside: that downvote is not mine. Don't know if it means that the program itself is not useful either, or means something else.) –  Arjan Apr 26 at 20:08

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