Access Denied, Error Deleting File or Folder problem in Windows

While trying to delete a file or a folder on your computer, you may get an error message, such as ‘Access denied‘. It could possibly be due to one or more of the following reasons:

  1. The file may be in use
  2. You don’t have permissions
  3. The file may be corrupt
  4. The user profile may be corrupt

Access Denied – Error Deleting File or Folder

So first check if the file or folder is in use. Close all open files and folders and try again. If it does not help, Take Ownership of the file or folder and see if you are now able to delete it. If even this does not help, check if you have the proper File and Folder Permissions.

If nothing help, you may try these steps.

Corrupt Files

Corrupted files are files whose behavior has changed and therefore no longer work properly. These files can be either a regular file such as pictures, documents or system files. Most corrupted files can’t be repaired and you should delete or replace them.

There are some actions you can take to prevent files from getting corrupted:

  1. Save a file properly. When something goes wrong or a problem is encountered while saving the file, it can get corrupted. For example, the program saving the file might stop working.
  2. Turn off your computer properly. Avoid pressing and holding the power button since the action forces Windows to shut down unexpectedly.
  3. Use the Safely Remove Hardware option while removing USB’s.

Nevertheless, if you think that a corrupt file could be the cause for your getting the Access Denied error, you may want to try and repair the file.  Try the freeware File Repair and see if that helps. File Repair is a freeware tool that lets you repair corrupt Word, Compressed Image, Video, Music. PDF files easily on your Windows computer.

If you can’t fix the corrupted file, try retrieving an older version of the file to replace the corrupted version.

Your local user profile is corrupt

You can try the following steps to resolve the issue if your local user profile is corrupt however, be sure that the files you are deleting are not important or of no use to you. That’s because deleting an important file like a system file can cause serious problems to the OS and/or other programs.

On a rare occasion, Windows might not read your local user profile correctly, this may cause problems accessing files and folders. You may need to create a new local user profile/account. For creating a new local user account, follow these steps:

Move the mouse cursor to the upper right hand corner of the screen and select ‘Settings’. Next, choose ‘Change PC settings’ option.

change PC settings

From the left-navigation pane, choose ‘Accounts’. Under ‘Accounts’ section, select the third option – ‘Other Accounts’. There in the right-pane you will find ‘Add a User’ option. Click it.

Add a user

If you want the person to sign-in without a Microsoft account, hit the option present at the bottom and click the ‘Next’ tab.

without microsoft

Next, select ‘Local Account’.

Local account

Enter ‘Username’ and password for the account. If you chose not to use a password then click or tap on Next without entering a password.

TWC account created

Then, click ‘Finish’.


Finally, you can see a local account created under ‘Other Accounts’ section.

TWc account visible

Now see if you continue to get Access Denied error messages and are able to delete the file or folder.

If nothing helps, you may see this link and use one of the freeware: How to delete undeletable files & folders in Windows.

How to open an encrypted file if access is denied in Windows may also interest some of you. Read this post if you receive File In Use. The action can’t be completed because the file is open in another program message.

Posted by on , in Category Windows with Tags
Anand Khanse is the Admin of, a 10-year Microsoft MVP Awardee in Windows (2006-16) & a Windows Insider MVP. Please read the entire post & the comments first, create a System Restore Point before making any changes to your system & be careful about any 3rd-party offers while installing freeware.


  1. Nice article. I often found that deleting some folders was prevented because thumbs.db is in use and I usually disable ‘Turn off the caching of thumbnails in hidden thumbs.db files’ in the Group Policy Editor.

  2. Adham Dahab

    I Use Permissions Time Machine v1.0 to restore default permissions to folder or files or registry keys it’s free and fast and easy

  3. Snehal Masne

    The main reason behind this is that the explorer.exe process locks files that are in use, effectively preventing you from deleting them. Usually, these files should not be touched, but sometimes, situations arise when you really need to erase some troublesome ones.

    Fortunately, there are a few easy solutions to delete those files.

    Solution #1: Kill explorer.exe

    Solution #2: Use The Windows Recovery Console

    Solution #3: Use unlocker

    More details and reference:

  4. landon

    Nice Article but,I would suggest you to try out Long Path Tool.

Leave a Reply

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

5 + 3 =