1

When I try to rename (or move) a folder, I get Folder Access Denied, and
You'll need to provide administrator permission to rename this folder.
There are three options: Continue, Skip, or Cancel. See the screenshot below.

'need to provide administrator permission' - Continue

It's not a big deal, really. – I click Continue, and the folder is renamed.
But when this happens frequently, it soon gets rather annoying.

Some prerequisites :

  • I am using an administrator account.
  • I am the owner of the folder.
  • My folder permissions are Full control.
  • I have set User Account Control to Never notify.
    (Press WinKey+r, copy-paste 1 useraccountcontrolsettings, and press Enter.)
  • The folder is outside both C:\Program Files and C:\Program Files (x86).

The behavior is as if the folder were in C:\Program Files, for example.

I had the same problem a few years ago. I found a link online that explained how to solve it.
If I recall correctly, it was a simple matter of changing merely one of the folder properties.
Frustratingly, it seems I never bookmarked that helpful link.

I have to click Continue every time, to rename the folder. How can I avoid this?

Some related questions


1 Ctrl+c to copy, and Ctrl+v to paste.

Henke
  • 1,261

2 Answers2

0
I have to click Continue every time, to rename the folder. How can I avoid this?

Right-click the folder, then Properties > Security > Advanced > Enable inheritance > OK.

Solution: click 'Enable inheritance', and then OK.

^ click to enlarge

This solved it for me. But maybe your case is different? 1


1 Does this help? Fix the “Failed to Enumerate Objects in the Container” Error.

Henke
  • 1,261
0

To take control of the folder that cannot be deleted, 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:\directory_name_you_want_to_delete.

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.

Destroy666
  • 12,350