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

This question already has an answer here:

I am not able to delete one folder on the desktop....if i try to delete i get the message as "Access is denied". I tried running the command from cmd prompt as an administrator:

RD /S /Q "C:\Users\username\Desktop\folder"

Still the same error.

I tried to change the permissions on the folder but still I am not able to do the changes I again get access denied. Any help will be much appreciated.

share|improve this question

marked as duplicate by Ƭᴇcʜιᴇ007, Carl B, Mokubai, mpy, gronostaj Aug 25 '13 at 14:13

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.

Is a program using it? – Mehrdad Aug 24 '13 at 7:44
Does this issue still happen after a restart? Either way, I would imagine you don't have ownership of the folder. – Dave Aug 24 '13 at 8:19

The issue is that your user does not own the folder. You can review the folder permissions with the following command (from cmd.exe):

C:\>icacls C:\Users\username\Desktop\folder
C:\Users\username\Desktop\folder NT AUTHORITY\SYSTEM:(I)(OI)(CI)(F)

Successfully processed 1 files; Failed processing 0 files

If the ownership doesn't look correct, you can take ownership and give yourself Delete permission:

C:\>takeown /f C:\Users\username\Desktop\folder /r /d y
C:\>icacls C:\Users\username\Desktop\folder /grant username:D /t

Once your user owns the folder and has the correct permissions, you should be able to rd /s /q C:\Users\username\Desktop\folder.

share|improve this answer

Common cause of this problem is that a Process (like a Program) using the specified Folder right now. so you have to end the process. There are many methods you can see which process are using the Handles. You can use "Resource Monitor" program that have in-cloud with Windows. You can use Resource Monitor by typing "resmon.exe" in Start Search-box. in the CPU tab, at Associated Handles drawer you can put the Path of folder and search for process which have using it. then you can stop the process using this command in CMD.exe
taskkill /IM [PROCESSNAME]
Now maybe you can Delete the folder. (Also you can use Unlocker to find the process and end it)

The other method you can try is deleting folder from Safe-Mode.
Safe-Mode doesn't start the Third-party process, so there is no handle on the Folder expect a System file handled it.

share|improve this answer

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