10 Fixes For Can’t Delete File Or Folder In Windows

We all delete unnecessary files from our computers to increase the storage space or to declutter. However, sometimes Windows might not allow you to force delete a file and will show error prompts.

Generally, these prompts say that “Folder in use.” This occurs when you try to delete a file that is open somewhere and hence is in a locked state. But sometimes, the folders are empty, or no file is available in them, and Windows doesn’t allow you to delete them. 

This guide will assist you to force delete any file or folder in Windows 10. The below-given fixes can help you if the delete keyboard shortcut isn’t helping you delete a corrupted file.

Why Can’t I Delete Certain Files on Windows 11/10/8/7

There could be numerous causes for the “Can’t delete file/folder” error, and it is important to know these causes for the error before you go ahead fixing it. Here are a few reasons why you can’t delete files or folders.

  • The file could be opened in the system by either programs or Windows background processes.
  • There is a disk failure or corruption.
  • You get an “Access Denied” message when deleting any file or folder from an external drive.
  • The recycle bin is full.
  • The folder or file is corrupt.
  • The file is a system file that Windows can’t allow you to delete.
  • The file or folder is malware or virus affected.
  • You are trying to delete a folder or file that is read-only.

PART 1. Windows Prompt When You Can’t Delete Folder in Windows 10

There could be several factors that can make Windows prompt an error message when you are trying to force delete a file or folder. By analyzing these prompts, you can figure out the root cause of why you can’t delete a folder or file.

Folder Access Denied

Windows can sometimes prompt a “Folder Access Denied” error message which says that you do not have enough permission to perform any action on the file or folder. You can force delete file or folder once you have changed the permission privileges. It’ll help if you are logged in as a system admin and not a guest.

Interrupted Action

While deleting files or folders, there could occur any unexpected error for which Windows will prompt an interrupted action error dialog box. You can scour the internet for the error code (such as 0x80070091) and gain more knowledge on the cause for the error and possible solutions based on it.

Item Not Found

Windows will prompt an item not found error message if the file or folder you are trying to force delete is no longer available at the location from where you are deleting it. You can verify the item’s location and then try the action again.

Folder In Use

This is the most general of all prompts and is easy to resolve. It is possible that the file or folder that you are trying to force delete is open in some other program or as a background process. It would be best to close all the applications that might be using the file or folder and then attempt to delete the folder.

See also  6 Fixes For Laptop Not Detecting Nvidia Graphics Card

PART 2. How to Fix Can’t Eliminate Folder Error in Windows 10

Knowing the causes behind why Windows can’t delete folder errors isn’t enough. You need to understand how you can fix the issue whenever you are faced with one. 

Here we have listed a few fixes or methods that you can follow to delete a file or folder that gives an error or isn’t deleted normally.

  1. Reboot your system
  2. Use a dedicated third-party cleaner
  3. Delete the file/folder using Command Prompt
  4. Check your antivirus
  5. Change the Ownership of the file/folder
  6. Enable the hidden administrator account
  7. Remove AMD Uninstall Utility
  8. Use Microsoft’s Troubleshooter
  9. Use Safe Mode
  10. Use the chkdsk command

1. Reboot Your System

Restarting your machine is the simplest of all fixes. Sometimes Windows can become unresponsive and give error prompts for performing any action. Some users face trouble opening the start menu.

You can restart your system and try deleting the target folder or file again. However, if the issue isn’t resolved, follow ahead for more fixes.

2. Use a Dedicated Third-Party Cleaner

Third-party cleaners can unlock and force delete a file that you want from your Windows PC. You can choose specific files, folders, and file types to be selected and cleaned by the cleaner.

For instance, IObit Uninstaller is a third-party cleaner that allows users to select custom files and folders using a checkbox on the list of options.

3. Delete Any File/Folder Using Command Prompt

If you aren’t able to delete a file or folder using the delete button, you can use the Windows command prompt to delete it.

Step 1. Press the Windows icon key and type “cmd” in the search box.

Step 2. Click on Command Prompt option and then click on Run as Administrator from the menu to open the command prompt with all permissions.

Delete folder windows type cmd

Step 3. Type del and then file path that you want to delete and hit enter. For example, del C:/Users/Folder/File.txt.

It will help you force delete file or folder. You can also delete multiple files by typing each of their paths separated by spaces.

4. Check Your Antivirus

Sometimes antivirus software interferes with Windows functions and does not allow the OS to operate properly. Antivirus software is important to protect your system from malicious contents using a virus scan. It is a useful feature, but it comes with a few drawbacks.

Suppose your antivirus program is interfering with Windows. In such a case, you can fix it by checking the settings in the antivirus software and making sure that no such feature that prevents certain files from being deleted is enabled.

You should remove the antivirus from your system if it keeps on interfering with your operating system and look for other alternatives such as Avast, BitDefender, Kaspersky, QuickHeal, etc., to protect your PC.

5. Change the Ownership Of the Target File/Folder

It is plausible that you may not have complete ownership of the file or folder that you are trying to access, and hence you are not able to delete a file. For this fix, you will need to have admin privileges.

Step 1. Go to the spot of the file you want to delete and right-click on it.

Step 2. Click on Properties from the context menu and then go to the Security tab in the property window.

Properties for folder in Windows 10

Step 3. Move the pointer down to the Advanced button to open the Advanced Security Settings window.

Advanced settings for Cannot be deleted file

Step 4. In the Owner text box, click on the Change option. Generally, the owner is set to SYSTEM.

Change file permissions

Step 5. Inside the Select User or Group dialog box, enter the username in Enter the object name to select box and click on the Check Names button. If all is okay, press OK.

See also  14 Fixes For Your Device is Missing Important Security and Quality Fixes

Step 6. Once the owner’s name has changed, click on Replace owner on sub containers and objects checkbox and click Apply button.

Step 7. Close all windows and restart your system.

Step 8. Follow steps 1-3 once the system reboots. In the Permission tab in advanced options, check the Replace all child object permission entries with inheritable permission entries from this object checkbox. Click the Edit button.

Step 9. In the Permissions window, make sure that all checkboxes are set to allow giving you full control.

Try to delete the file/folder again. You can learn to delete the file/folder. If not, move to the next fix.

6. Enable the Hidden Administrator Account

It’s possible that you don’t have great security privileges, due to which you are unable to delete the file or folder.

Windows 10 offers a hidden administrator account that can help you in fixing various problems. You can use this account to try and remove the individual files.

Step 1. Press the Windows icon key and type PowerShell in the search box. Right-click on the Windows PowerShell result and choose Run as Administrator. Alternatively, you can simultaneously click Windows key + X and choose PowerShell (Admin) from the menu.

Powershell for changing permission of file

Step 2. In the PowerShell command line, type Enable-LocalUser -Name “Administrator” and press enter key.

Change permission to fix can't delete folder

The above command will enable the administrator account, and you can gain access to it. You can disable the account again by typing Disable-LocalUser – Name “Administrator.”

Once you are able to log in as an administrator, you can delete the file or folder you want. If not, move towards the next solution.

7. Remove AMD Uninstall Utility

Some third-party applications such as AMD Uninstall Utility interfere with Windows processes and cause problems.

“Can’t delete files” is one such problem caused by AMD Uninstall Utility third-party tool. To fix the issue, you should remove the software from your system.

You can do this by navigating to the control panel and then moving to uninstall a program section. You can also use third-party uninstallers for this purpose which will remove all files and related registry entries of the application.

Once the software is uninstalled, you will be able to delete files promptly. If not, please follow the next solution.

8. Use Microsoft’s Troubleshooter

If you don’t understand the probable cause for why you can’t delete files, you can use Microsoft troubleshooter by downloading it from the Microsoft store.

Step 1. Go to this link to download Microsoft Troubleshooter.

Step 2. Once downloaded, run the troubleshooter. Navigate to File and Folder Troubleshooter and click Next.

Step 3. Follow the on-screen troubleshooting instructions to troubleshoot the problems with the folder.

Once Windows is done with troubleshooting, try to delete the file or folder again from file explorer. If you aren’t able to do it, follow the next steps.

9. Use Safe Mode

It could be that some of the recently installed applications could be affecting the file removal process. Booting Windows in safe mode will allow only the necessary programs to run and help you identify where the problem lies.

See also  9 Fixes For Blue Yeti Not Recognized On Windows

If the below steps do not help in going to safe mode, you can get into it using third-party applications or using F8-F10 keys.

Step 1. Navigate to the Start menu and click on the power button.

Step 2. Press the Shift key and hold. Click on the Restart option from the menu.

Restart to enter advanced startup

Step 3. From the visible list of options, select Troubleshoot and then click on Advanced options.

Step 4. Click on the Startup Settings and press the Restart button.

Step 5. A list of options will be visible on the startup settings screen. Click on Safe mode using keyboard keys.

In safe mode, you can try and delete the file or folder. Once deleted, exit safe mode. However, it is a workaround and is useful only if you have to delete a few files or folders.

10. Use the chkdsk command

Check Disk is a Windows utility command that allows you to scan potential errors in a specific disk. It is useful for fixing many problems, including being unable to delete files.

Step 1. Press the Windows icon key and type the command prompt in the search box. Right-click on the Command Prompt section and choose Run as Administrator.

Step 2. In the command line, enter chkdsk /f and press enter.

Check disk for certain file

Step 3. In the next prompt, click Yes.

Step 4. Once the disk scanning is complete, restart your computer and open File explorer to search and delete the target file.

Chkdsk is an efficient fix that can fix any potential errors. We hope that by now, you are able to delete undeletable files, any empty folder, system files, locked files, any stubborn folder, etc., successfully.

How to Recover Any Mistakenly Deleted Files from Windows Computer

Sometimes users delete files from their system permanently and want to recover the mistakenly deleted files or lost files. There are numerous third-party tools, such as MiniTool Power Data Recovery, Recuva, etc., that can help you recover lost files and restore data from Windows.

These tools allow you to recover lost data from Windows 10 computers, USB flash drives, SD cards, SSD, TF cards or other storage devices.

To use the MiniTool Power Data Recovery tool, you need to download and install the tool and launch it in your system. Next, you need to navigate to the settings and choose the file extension you wish to recover, and click on the Scan button. Allow the recovery scan to complete and then check if the deleted files are available in the displayed list.

FAQs

How Can I delete a folder that won’t delete?

Reboot your system
Use a dedicated third-party cleaner
Delete the file/folder using Command Prompt Window
Check your antivirus
Change the Ownership of the file/folder
Enable the hidden administrator account
Remove AMD Uninstall Utility
Use Microsoft’s Troubleshooter
Use Safe Mode
Use the chkdsk command

Why can’t I delete folders?

If the file you are accessing is open in another application or is affected by a virus, you will not be able to delete it. It is also possible that you might not have enough permission to delete the file.

How do I force delete a folder?

You can use the command prompt’s del command to force delete a file or folder. The guide contains detailed processes and steps for deleting a folder.

What to do if a folder Cannot be deleted?

If you are unable to delete a folder, you should check if you have enough security or admin privileges or not. You can also utilize the command prompt or check the antivirus by following the steps given in this guide.