Fix Error Cannot Delete Folder [Directory is not Empty 2024]

Written By Steven Arends

Are you trying to delete a folder or file but couldn’t perform the deletion because of something you don’t know about? The screen continuously shows you “Cannot delete folder, the directory is not empty” or “Cannot delete file. Cannot find the specified source file or disk” or something similar?

Voilà! You’ve just come to the right place.

fix-error-cannot-delete-folder

According to a survey, 87% of individuals have access to a computer in their households. And among them, the Windows 10, 8, 7, Vista, or XP user faces or faces this Cannot Delete a File or Folder error in their Windows.

So, Why can’t I delete a folder?

You can’t delete a folder because it is corrupted or it is in the read-only mode. Besides, the issue can be occurred due to the disk being write-protected, other programs or system processes using the file. And sometimes you’re not allowed to delete some files too.

Whatever the reason behind your problem, tag along, read till the end and apply the below-mentioned 100% working methods to resolve your issue.

How to Fix Error “Cannot Delete Folder, The Directory is not Empty”

Windows is the most widely used computer operating system in the world. According to multiple surveys in 2021, 69.61% of consumers use products that are running Windows every day, more or less, for numerous purposes.

We work with a humongous amount of data and files almost regularly. So we need to download files and create files, which comes with deleting some of them.

But while deleting files or folders, sometimes many of them face they can’t delete a file or folder. I find this error a very bothersome one.

There are different versions of this problem. You may see “Folder Access Denied. You need permission to perform this action”, “Cannot delete file. Cannot read from the source file or disk”, or “Cannot Remove Folder. Cannot find the specified file” on your screen for various reasons.

I will give you the 2 viable solutions, and you can apply them on your PC to resolve this issue. So, don’t waste your time, and start applying them one after another right away.

Related content you should read: Install Active Directory Users and Computers on Windows 11.

Here is the functional methods you can follow to solve the “Cannot delete folder, the directory is not empty” problem:

Method 1: Modify Folder’s Permission

If you continuously face problems deleting a particular file or folder, maybe the file or folder has some bugs or write-protected issues. So, you need to modify the folder’s permission to make sure you can delete the file.

Here’s a way how you can modify the folder’s permission:

  • Right-click on the folder and select Properties.
  • Move to Security and remember the location of the required file, i.e., the object name. Click Advanced. the-object-name
  • Select Change on the right side of Owner. the-right-side-of-owner
  • Enter your username, i.e., where the defective folder lies in the Enter the object name to select enter-the-object-name
  • Go to File Manager and locate the file destination. In my case, I know the file lies in the HP folder.file-manager-and-locate-the-file-destinationfile-manager-and-locate-the-filefile-manager-and-locate-the-file
  • Click on Check Names. You’ll see the system detects the file’s exact location and thus clears it out. Click OK. You’ll end up in Advanced Security Settings for Error advanced-security-settings-for-erroradvanced-security-settings
  • Check on the Replace owner on subcontainers and objects option and click Apply. replace-owner-on-subcontainers
  • Click OK when a Security prompt pops up. click-ok
  • Click OK in the Advanced Security Settings for Error window.

Close all the tabs and windows and restart your PC. Try deleting the folder or file again. I believe this time you don’t have to be disappointed. Yet, if you can’t resolve the issue, move to the next one.

You may also like to read: 13 Best Windows 11 Settings You Should Change Right Away.

Method 2: Chkdsk Scan

If you can’t delete the required file or folder, you can use the Chkdsk command prompt and thus solve your problem.

Here’s a path you can follow to resolve your “Cannot remove folder, directory is not empty” problem:

  • Press the Windows key and type cmd. Click Run as administrator and click Yes to confirm your decision.cmd-run-as-administration
  • Copy chkdsk c: /F /R and paste in the command prompt. My target file is in the C drive, so I have to write this way. Make sure you change as per as you have to. chkdsk-c-r-and-hit-enter
  • Hit Enter, and you’ll see Chkdsk cannot run because another process uses the volume. Type Y and press Enter.

So, you’ve scheduled it to run the next time you start your PC. So, restart your PC and try deleting the file again. You’ll definitely be able to delete the file this time.

So, that’s how you delete a folder that says the directory is not empty.

Check out our separate post: Windows 11 Remote Desktop Authentication Error.

How to Fix Error 0x80070091: The Directory is not Empty

When the error 0x80070091 occurs, it indicates that the directory is not empty. And surprisingly, it can appear in different scenarios. So, you can get confused by the reasons behind you facing this issue.

So, what causes Error 0x80070091: The directory is not empty?

Error 0x80070091: The directory is not empty is caused by corrupted data lying on the file or folder, the external drive is corrupted. Apart from these two major reasons for facing the issue, there might be some missing files causing this problem.

Well, you need to take some steps to settle down the issue. As there are some techniques to follow, I suggest you try one after another.

Here is the required approach you can take to fix the “error 0x80070091: The directory is not empty” issue:

Fix 1: Try Windows Recovery Environment

Using Windows Recovery Environment can be enough to fix the issue. But you have to make precise decisions to finalize the outcome.

Here is a trail you can follow to fix the issue:

  • Press the Windows key. Hold the Shift key and choose restart.
  • Pick Troubleshoot on the Windows Recovery Environment
  • Go to Advanced Options and then System Restore.
  • Choose the required Restore Point. Try following the on-screen instruction to finish the process.

Fix 2: Uninstall the Antivirus

Sometimes using an antivirus on your PC can result in Error 0x80070091: The directory is not empty problem. So, you need to uninstall your antivirus and check if the problem stays.

Here’s a quick path you can follow to uninstall your Antivirus:

  • Tap the Windows key, type Control Panel, and hit enter. Control-panel
  • Choose Programs and then click Uninstall a program. uninstall-programm
  • Scroll down and find your antivirus.
  • Right-click on the antivirus and click Uninstall.

Restart your PC and perform the task again. See if the issue is resolved finally.

Fix 3: Run System Restore from Safe Mode

Running system restore from the safe mode can also resolve the Error 0x80070091: The directory is not an empty issue. This option uses a simple interface and more interestingly work on the only app that is required. So, no antivirus can interrupt the system.

Here’s the way you should follow to run System Restore from the Safe Mode:

  • Click on the Windows icon and select the Power
  • Click on Restart while holding the Shift You’ll end up in the Windows Recovery Environment section.
  • Choose Troubleshoot and then pick Advanced Option.
  • Click Startup Options and then Restart. So, you have enabled the Safe Mode. Now, you have to run the System Restore.
  • Press the Windows key+R to open the Run
  • Type exe and tap enter.
  • Choose Next and pick the required restore point.
  • Select Next and click Finish.

Give your system to finish the process. See if your issue is resolved.

Hence, these are the solution on how to resolve Error 0x80070091: The directory is not empty. Apply them precisely to get the best result.

Read more on how to Password Protect a File or Folder in Windows 11.

Conclusion

Cannot Delete Folder: Directory is not Empty is a well-known error Windows user faces globally. There are 2 definite ways you can follow to fix this issue and I recommend you use them individually.

Yet if you fail to perform let me know in the comment section. Besides, inform me if you have additional queries.

About The Author
Steven Arends is a computer science graduate and tech enthusiast with over 10 years of experience in the field. He has a vast collection of computer hardware and loves exploring the latest advancements. As a contributing author to 10Scopes, Steven shares his expertise to make the world of technology more accessible and easier to understand for all readers.

Leave a Comment