How to fix you don’t have permission to delete these folders or files?

Please Share On:

In your own PC where you are the administrator, you are unable to delete files and folders because of less permission access. In that condition, you need to change your files or folder’s permission to full control permission to make changes on those files or folders.

Types of Permission:

First, you need to understand, that there are three types of permission:

Read, Write, and Execute. If you have all these three permissions in your files and folders, you have full control access permission. If anyone is missing, keep in mind that whichever is not showing in your files and folders, you don’t have permission for that.

Check Permission:

First, let’s check the permission of any folder from your PC. Follow the steps below to check a permission.

  1. Select any folders from your PC. For example: I select C:/Users. Right-click on it and select properties.

2. It will open the User’s Property tab.

3. Select the “Security” tab on it.

4. Select the Group or User names and check their permission. In the above, picture you can see everyone has limited permission. When I select Administrators and see the permission which is different and has full control.

You can simply compare both Group or User names permission by yourself.

Here is a screenshot for you to see the administrator permission.

Now, you know how to check your files and folder permission.

Change Permission:

To take control of the folder that cannot be deleted, copy the following lines of code in your notepad and save it at delete.bat.

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

Don’t forget to replace your directory location from D:\WindowsApps to D:\MyFolder

Now, go to the location where you saved the delete.bat file. Right-click on it and select “Run as Administrator”.

It will open your command file as shown in the image below and change your folder permission too.

Now, you go back to the old files which you were unable to delete. Delete those files now. You will be successfully able to delete it and get a Delete Folder Alert Message.

Select “Yes”.

That’s it. Now you have successfully deleted a folder that you were not able to delete because of limited permission.



You may interested in the following topics:

Leave a Reply

Your email address will not be published. Required fields are marked *

Copyright @2023. All Right Reserved.


Social media & sharing icons powered by UltimatelySocial