How to delete a folder that cannot be deleted in Windows

Share on facebook
Share on twitter
Share on linkedin
Share on reddit
Share on email
Share on whatsapp

First of all, we must know that more and more contents are what we work with on our Windows PC. These are in the form of both files and folders that we use for all kinds of applications on the computer. Normally these are copied, moved, created or deleted on a regular basis. But sometimes, when we are about to eliminate a certain folder on the computer, it shows us the message that says something like that the folder is in use and cannot be deleted.

In fact, this even affects part of the files that it contains, so in these same lines we are going to give you a series of reasons and solutions so that you can solve it.

Reasons why we cannot delete a folder

One of the most common reasons that cause this problem that we are talking about, is that I cannot delete the folder because Windows it is open. This also applies to the fact that the operating system itself has some of the files that it contains open, so we cannot delete it anyway.

On the other hand, it may also be the case that we do not have the necessary permissions to delete that specific content. The folder may belong to another user, or the administrator of the team may have specified a series of use permissions for it. Be that as it may, this is something that we will probably be able to solve in one way or another. In addition, this is something that is especially important if that folder has large files that we cannot get rid of.

Before trying anything, yes, we recommend restart the pc completely and try to delete the content in question, again. These Windows restarts fix more system problems than we might first imagine.

Methods to delete a locked folder in Windows

As we mentioned before, this is a problem that occurs in Windows-based computers in a more common way than we would like. But we cannot allow those files contained in the problem folder to stay there forever. This can become a real nuisance.

Close all programs and restart

The most common in these cases is that we have one of the running applications, with a file in the folder, open. Moreover, this can also occur with a file that is open by a program in the background. Therefore, the first recommendation that we make to you in this regard is to close all open applications.

In the same way, if this at first we see that it does not solve the error of the deletion, as we mentioned before, we should restart the Windows PC completely.

Kill the process with Task Manager

It may also be that some of the programs that we had open before, such as Microsoft Word, has been blocked or hung. If we had a file open in the folder that we want to delete with the text editor, we will not be able to.

Word lock

Therefore this directory crash is due, in a nutshell, to Windows File Explorer having decided to leave the folder as an open process. Normally this is the most common situation for which this problem arises, so the corresponding warning will appear in the window. To solve this that we are commenting on, what we will have to do is eliminate the process as such that has the file in the folder open.

The first thing will be to use the key combination Ctrl + Shift + Esc so that we can access the Windows Task Manager. We also have the possibility to click with the mouse on the Taskbar with the right button and choose Task Manager. In the window that appears, we will have to locate the program or process that has our file or folder open. This appeared in the message that showed the warning when trying to delete the folder.

finish word

Thus, we only have to look for the corresponding name in the list and right-click on it. We no longer have to select the End task option to close the process in question and we now try to delete that locked folder.

Restart the Explorer.exe process

At this point, here it is also possible that it is Windows File Explorer itself that has the folder open by mistake, for whatever reason. This is something that we can also solve by ending the process of this particular element. Therefore, in the same way as in the previous case, we return to the aforementioned Task Manager as we told you before.

But in this case what we have to identify is the process called Windows Explorer. To end it, we just have to right-click on it to choose the Restart option.

restart Explorer delete folder

Now we just have to try again to delete the folder that was blocked by Windows.

Delete the folder in safe mode

Another possible solution if we come across this case is to use the failsafe mode to try to delete a file that Windows offers us. To do this, as you can imagine, what we need is to start Windows in safe mode. Then we just have to use the Win + R key combination to open the Run box where we write the command msconfig.

This will lead us to a window in which we will have to go to the Startup tab. Here we only have to click on the Safe Start selector, with which we activate it. Once active, we choose the Minimum option here and click on Apply, after which we restart the equipment and delete the folder in question.

Delete from CMD

As a general rule we have the possibility of quickly and effectively deleting any folder from the command prompt or CMD. This is sometimes extended to content blocked, for one reason or another, by Windows itself. Of course, it should be noted that this method requires administrator permission.

Thus, all we have to do is type the cmd command in the search bar to open a Command Prompt window. We right-click on its entry and choose Run as administrator. Once the new window appears on the screen, we only have to go to the disk path of the folder that we cannot delete and enter the following command:

DEL /F/Q/S*.* >NUL

What we really achieve with this is to remove all the files from that path quickly and easily and thus release the lock.

Scan Windows for Viruses

It may also be the case that, without us knowing it, some kind of malware has arrived and infected our PC. This, among many other things, could cause certain folders to be blocked, which prevents us from deleting them. Therefore, at this point, the best we can do is scan the computer for malware.

Windows defender general

For this we can use any antivirus that we have installed. Serve as a clear example of this, the one that integrates the Redmond system itself, Windows Defender. This is found in the Windows Settings application. Specifically, we only have to go to Update and security / Windows Security.