Simply Delete a File or Folder Showing Error “Access Is Denied” using Full Control

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"
ICACLS %DIRECTORY_NAME% /grant administrators:F /t
  • You will need to change the directory path to your “Your Desire Want to Delete Directory” folder or file path e.g. “C:\Locked Directory” to “C:\Your Desire Want to Delete Directory”.

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

Source: superuser


Thanks!!! For the trick

1 Like

I guess Unlocker does the same thing

Unblocker won’t work for such permission case! That’s why this script is needed to gain full access!

1 Like
Friendly Websites