Windows 7 – Fix ‘You Need Permission to Perform This Action’ Error

windows 7

I can't delete a certain folder in Windows 7. It's not a system folder. It was created by an app. I get an error message "You need permission to perform this action. You require permission from Tony….". I am an admin and logged in as myself Tony. I have full ownership of the folder with full control permission. I rebooted the machine. I killed the app which created the folder. I am out of ideas.

Why is Windows 7 not letting me delete the folder?

Best Answer

I am not sure why this happens but there is a workaround.

To take control of the folder containing the undeletable create a text file called “delete.bat” and add the following lines to it:

SET DIRECTORY_NAME="C:\Locked Directory"
TAKEOWN /f %DIRECTORY_NAME% /r /d y
ICACLS %DIRECTORY_NAME% /grant administrators:F /t
ICACLS %DIRECTORY_NAME% /reset /T
PAUSE

You will need to change the directory path to match your requirements e.g. “C:\Locked Directory” to “C:\Delete Me”.

Right click on the file “delete.bat” select “Run As Administrator” and you should now have full control of the directory and all sub directories meaning you can do what you wish with them.

Related Question