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:
- The file may be in use
- You don’t have permissions
- The file may be corrupt
- 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.
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:
- 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.
- Turn off your computer properly. Avoid pressing and holding the power button since the action forces Windows to shut down unexpectedly.
- 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.
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.
If you want the person to sign-in without a Microsoft account, hit the option present at the bottom and click the ‘Next’ tab.
Next, select ‘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.
Then, click ‘Finish’.
Finally, you can see a local account created under ‘Other Accounts’ section.
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.