What to do if the folder is not deleted. How to delete a folder if it won't delete

On Windows of any version (XP, 7, 8, 10), a problem often arises when a file or folder with a locked file is not deleted. A message pops up that the file is occupied by another process or is open in some program, or you need to ask permission from someone.

There are several ways to delete a file that is not deleted, renamed, or moved. This is done without additional software, using free program Unlocker, from a bootable USB flash drive or LiveCD, or the DeadLock program.

When deleting locked files and folders, be careful, this may be part of operating system. Without them, Windows will stop loading.

Why isn't it deleted?

  • The file is open in another program. Terminate any unnecessary processes and try again. Sometimes restarting the computer helps.
  • Insufficient permissions to delete. For example, this file was created by another user or the computer administrator removed the deletion rights.
  • Exceptions

    The methods described in the article will not always help:

    • pagefile.sys and swapfile.sys - to remove, disable the swap file.
    • hiberfil.sys - deleted when hibernation mode is disabled.
    • If an access denied message appears. You need to become the owner of the file or folder. The easiest way to do this is with the TakeOwnershipPro program.
    • If a message appears asking permission from TrustedInstaller. This is protection against the removal of system components.
    • Windows.old - folder with old version operating system. It is deleted through the “Properties” of the local drive C. On the General tab there is a “Cleanup” button. A window will open in which select “Clear system files" After the analysis is completed, the “Previous” item will appear in the list in this window. Windows installations" Check this box and click OK.

    Deleting the file manually

    Message: The file is already in use, please close and try again.

    If a file doesn't want to be deleted, the error message usually tells you which process has locked it. This could be explorer.exe or any program that has it open. If you close this program, the file will be deleted.


    If the file is occupied by the explorer.exe process

    • Before completing the task, open Command Prompt as an administrator. It is located in “Start - All Programs - Accessories”. Right-click on Command Prompt and select Run as Administrator.
    • Remove the explorer.exe task in the task manager and write it in command line del full_path/name.extension.
    • The path does not have to be entered manually. Right click on the required file with Shift held down - Copy as a path and paste it into the command line via the right-click context menu.
    • Now restart explorer.exe. In the task manager, click "File - New task - explorer.exe".

    Use a bootable USB flash drive or disk

    If you have a bootable USB flash drive or LiveCD, or Windows recovery, run them and calmly delete the file using the standard method or through the command line.


    Be careful sometimes when entering through boot disk local drives have different letters. To see a list of folders on drive C, type dir c: on the command line.

    If you use a bootable USB flash drive or a Windows installation disk, the console opens at any time after the language selection step by pressing the key combination Shift + F10.

    You can also select the system recovery mode, which will be offered before starting the OS installation.

    Command for deleting via the console: del full_path_to_the_file.

    Using DeadLock

    The free DeadLock program allows you to delete a locked file and change the owner. Download from the official website: https://codedead.com/?page_id=822.

    Using the File menu, add the problematic file to the program. Right-click on it in the list - unlock it (Unlock) and delete it (Remove).


    Using Unlocker

    The simplest and most popular program, but now even on the official website a warning about unwanted software is displayed. Along with the program there may be some other virus or advertising, so use at your own peril and risk. Try the methods above first. Website: http://www.emptyloop.com/unlocker/.

    After installation, a new item will appear in the context menu, which is called Unlocker. After clicking the button, the program will complete the interfering process and the file will be unlocked.


    If you want to delete a folder, first delete all its contents.

    Via command line

    There was such a case that the file did not want to be deleted in any way. The size was 0 bytes, the name was written in Russian letters (not supported in older versions of MS-DOS), there was a Read-only attribute and an A attribute (only reading and adding content). The command line helped.


    That's all for now. If you know simpler and more effective ways, write them in the comments. Which method helped you?

When working with a computer, we constantly create and delete many files and folders. But what if the folder is not deleted? In this article, I will show you how to delete a folder that won't delete.

There are several reasons why we cannot delete a file or folder. I will list the main reasons and ways to solve them.

Folder in use

You will not be able to delete a folder if it is being used by any program. Try closing all programs. If this does not help, then restart your computer.

The folder is protected from deletion

This usually applies system folders and files. I do not advise you to try to delete such a folder, as this may negatively affect the operation of the system or cause it to fail completely.

Folder with a program or game

If you need to delete it earlier installed application no need to try to delete its folder. Use this simple guide:

How to delete a protected folder

Think again about whether you really need to delete this folder. After all, protection against deletion was not imposed by chance. If you are sure that this procedure is necessary, you must use a third-party application.

That's all. Now you can delete this folder.

To enable data cataloging in Windows, as well as in other operating systems, a tree structure is used, which is a set of nested special file container objects called folders. In Windows, folders can be system folders, storing files of the operating system itself, or they can be user-defined or program folders, that is, those created by third-party applications.

As a rule, the user can do whatever he wants with folders of the second type; he also has a lot of powers when working with program directories, for example, he can manually delete the folder remaining on the disk after uninstalling the application, but there are cases when the folder cannot be deleted by normal way. There may be several reasons for this. Most often this happens because the user does not have the necessary access rights; the directory may also be held by some process, may have an incorrect name, the path is too long, etc.

The folder is not deleted due to lack of administrator permission

Let's look at how to delete a folder if the action asks for permission from the administrator. This problem is most often faced by users working under regular or guest account, but this is also possible when you yourself are the computer administrator.

In the first case, to delete a folder, you will have to enter the password for the PC owner’s account, since the system will constantly ask you for it, or use the universal method, which will be discussed at the end of the article.

But what should you do if the folder is not deleted when working under an administrator account?

The reason may be that you either do not own it or do not have the appropriate access rights. Open the folder properties, switch to the “Security” tab and click the “Advanced” button in the window that opens.

In the new window, opposite the “Owner” line, click on the “Change” link.

In the next window, click the “Advanced” button. Another window will open.

Leave the object type in it as “User”, then click the “Search” button and select the user you want to make the directory owner from the list that appears at the bottom.

Click "OK" and "OK" again.

After the owner has been replaced, check the box next to “Replace owner of subcontainers and objects” and save the settings.

Next, you will need to give the new owner full permissions to the folder. Click “Edit” in the properties window, select the desired user in the permission changes window, grant him full access rights and save the settings.

After this, the folder should be easily deleted.

Note: Folders owned by the system service are deleted in the same way. First, the owner of the folder is changed, then he is granted (if necessary) full rights and the folder is deleted.

The folder is being used by another program

Like any other file system object, a directory may not be deleted because it is being used by some process. How to delete a folder in this case? The first thing you need to try to do is identify the process that is holding it, the second thing is to forcefully terminate it using Task Manager or another specialized utility. In most of these cases, when the folder is not deleted, Windows writes that it is being used by another program, and the name of this program is usually indicated in the message box.

But it may also be that the program name will not appear. In such a situation, the utility can be a great help Process Explorer, included with the Sysinternals administration tools. Run the utility (it's portable), select from the main menu Find – Find Handle or DLL.

Enter the name of the folder to be held in the “Handle or DLL substring” field and click “Search”. In a couple of seconds you will get the name of the process, its PID in the Task Manager and the full path to the object used by the process.

By the way, using the utility, you can end the process and then delete the folder itself.

The system says that it could not find this element

Among the “undeletable” folders there is a special group that belongs to the so-called ghost objects. The difficulty here lies in the fact that it is not always possible to identify the reason for the appearance of such an object. This could be an incorrect (long or reserved) name, the action of a malicious program, another process blocking it, or damage to the file system. We already know how to check whether a process is blocking, now let’s try to figure out what to do if the folder is not deleted from the desktop with the message “this item could not be found.”

If the folder has a system reserved name, such as COM or PRN, you can delete it using the command line. Launch the CMD console as an administrator and run the following command in it:

rd //./Disk:/full path to folder

To delete a “non-deletable” folder with a too long name, you first need to know its short alias name. This is done again using the command line. Team cd /d (path) go to the parent directory of the problematic directory and print out the names of all the objects it contains using the command dir/x/n.

Note: if the folder is on drive C, the key /d does not need to be used in a jump command.

In our example, a folder with a name consisting of many dots has a short name 782F~1. Knowing the alias, we can safely delete it:

rd C:/Users/compik/Desktop/782F~1

A case that deserves special attention is when a folder is not deleted not because it has the wrong name or is being held by a system process, but because it simply does not exist, which may be indicated by the absence of an object in the command line list or the LiveCD file manager. This may indicate damage to the file system, therefore, before taking any further action, the disk must be checked for errors with the command CHKDSK.

Action of viruses

Less likely, but viruses that have entered the system can create a similar problem. Their action may be indicated by the constant automatic re-creation of the folder after it is deleted using LiveCD or special utilities, as well as the presence of suspicious hidden files, executable or configuration. The solution to the problem in such cases is standard - a full scan of the computer with at least two antivirus scanners, preferably performed offline before loading the operating system.

Invalid attributes

Another one possible reason, by which the folder is not deleted - the attributes set for it are system and read-only. It’s easy to check the presence of such “holding” attributes; just run the command attrib [full path to the folder] in the command line. The presence of the S or R keys will indicate that the folder is read-only or system. To unlock a directory, run the following command in a command prompt running as administrator:

attrib -r -s D:/Private /d /s

IN in this example we removed the “Read Only” and “Hidden” attributes for the Private directory at the root of drive D. After changing the attributes, the folder can be deleted.

If the folder is not deleted from the desktop or any other location, you can try using free utility Unlocker. This lightweight and extremely easy-to-use tool allows you to remove files and folders locked by system and third-party processes, it can also be useful when deleting objects that require higher access rights than local administrator rights, problems sharing files and folders, and other errors .

How to delete a folder in Windows 7/10 using Unlocker? Very simple. During the installation process, the utility is built into the Explorer context menu, so to delete an object you just need to right-click on it and select the “Unlocker” option in the menu. If the object is not deleted immediately, a window will appear in which you can select the desired action, such as deleting, renaming and moving. If a file or folder is locked by a system process that cannot be closed immediately, the utility will offer to delete the object when the computer restarts.

Above, we figured out why a folder may not be deleted from the computer, and at the same time we looked at the main ways to solve the problem. In conclusion, we suggest considering another way to delete blocked folders. Its main advantage is its versatility, since it allows you to gain almost unlimited access to file system computer. For this you will need any LiveCD based on Linux or WinPE with a built-in file manager. Having set the appropriate priorities in the BIOS, boot from such a disk, use the built-in Explorer to find the blocked object and delete it.

Everyone has unnecessary files that they then delete, but what to do if folder is not deleted. There is a problem in which the OS does not allow you to get rid of an unnecessary folder or writes that the file is open and cannot be erased.

Causes of the problem

You need to understand why the folder is not deleted:

  1. The antivirus application was blocking the data. If the antivirus considers the file infected or does not trust it, the program quarantines suspicious data and offers to disinfect the code. If treatment is delayed, the antivirus simply blocks the user from all access to data.
  2. The folder is used by other programs. You need to remember if there is software that can use this file. If there is, close the applications and delete the file. If that doesn’t work, go to the “Task Manager” and check to see if the application is active.
  3. To clear a folder, administrator rights are required. If you are running under an account with limited privileges, log out and log back in with administrator rights and try to get rid of the folder again.
  4. The file is being used by someone local network. Wait for it to finish and clean up.
  5. The OS uses the data. Restart or try clearing data in security mode.

How to delete a folder that won't delete

When deleting a folder, the system gives us a window in which it writes the reason for the rejection of the uninstallation. There are different arguments, but one of them is that the data is involved, you will have to make it free before uninstalling it.

We do the following:

  1. IN Windows versions 7 and XP press Ctrl + Alt + Del, and in Windows 8 and Windows 10 Windows + X. Go to the “Task Manager”.
  2. We look through the processes and find an application that can potentially use the folder.
  3. We delete the file itself.
  4. When the file is used by the explorer.exe process, launch the console with administrator rights, cancel the task by entering the full_path_to_the_file for cleaning in the del line.

To return to the desktop, you can do this: launch explorer.exe, to do this in the task manager, select “File”, “New task” and “explorer.exe”.

Removing a locked file via bootable media

If a folder on your computer cannot be deleted, there is another method to get rid of it. You need to run from a LiveCD or recovery disk. Windows flash drives. When using the disk we can use both graphical interface, and the console.

The first step is to get an idea of ​​the directories on the disk using the dir command, then use del path_to_file.

When using a flash drive or disk, press Shift + F10 to enter the console. Select “Restore system”, the link is in the installation program.

It is better to always check the drive letter from which the folder is being deleted, as they do not always match those displayed in the system.

A program for deleting folders that cannot be deleted – Unlocker

Folder not being deleted from desktop? - the Unlocker utility was created precisely for such a case. The application is free, it helps to detect all processes and locked files, and makes it possible to delete data. In the utility, you can rename files and extensions, as well as move a locked file.

Removal unnecessary file happens easily:

  1. Install the program.
  2. RMB click on the file.
  3. Select "Unlocker".
  4. Click delete and confirm by clicking “OK”

When a folder is locked, another window appears. In it, first click on “Unblock all”, and then “Delete”.

The folder is not deleted, what should I do?

Let's try to delete it using file manager - Total Commander. This manager allows you to bypass some restrictions.

We perform the removal:

  1. Loading FAR manager or Total Commander.
  2. After installation, look for the folder in the list.
  3. Click Delete.

The advantage of the manager is the detection of hidden and encrypted data. If the folder is not deleted, open it in the manager and look for hidden files; they are the ones that are interfering. To correct the situation, go to “Task Manager” - “Processes” - find the file - click “End Process”. After this we delete the section.

Delete using autoload

So, open “Start”, click “Run”. Enter msconfig and click OK. “System Setup” will be displayed. Go to “Startup” and find a file that is not removed.

Not finding the folder in this list, click “Disable all” - “Apply”, “Close”. A notification will appear that the changes will take effect after a restart. We reboot and try to delete the folder.

Removal using short names

Another method is to use a short name, because it may contain invalid characters. We go to the folder, to find out what the short name should look like, enter the command DIR /X or DIR /X /N, it will show all the files with their short names. A short name allows 8 characters per name and 3 characters per extension.

Press DEL to clear the folder by short name.

If you still have questions on the topic “What to do if a folder is not deleted?”, you can ask them in the comments

Hi all! Today I will tell you Howdelete a file or folder that cannot be deleted different ways, just in case you’ve already tried everything you could, but it still didn’t help. I decided to write this article because I myself once encountered a similar problem, that my design themes that were in the folder did not want to be deleted or moved. Why, they couldn’t even be opened or renamed.

Often when PC users try to delete such files, the following messages may appear: the file cannot be deleted, access is blocked, the disk may be full or write-protected, the file is occupied by another application, this process busy, folder is not empty. These errors occur for many different reasons, which you must first understand and understand what the problem may be before you try to do anything. So, there are not many reasons for this, here are some of them:

— You are trying to delete a file that is used by other programs. For example, if you were watching a movie or listening to music, but before you had time to close the player, you are already trying to delete the file being played, then no matter how hard you try, you will not be able to do this until you close all the corresponding applications that use this file in PC operation ( Personal Computer). It also sometimes happens that this file or folder is used by other applications, but you do not see them, although they are displayed in the task manager, which will be discussed below.

— You are trying to delete a file that is used by other users. For example, you downloaded it through a torrent tracker and then wanted to delete it, but for some reason it just doesn’t want to be deleted. The thing is that on the Internet you have this game another user is downloading, and until you turn off the Internet or exit the torrent program, the file will not be deleted.

-You don't have enough rights to do this. What does this even mean? Am I the owner of my computer or who? The fact is that you probably, like me once, could have placed your files or folders in the system folders Windows operation, to which access is prohibited for your own safety. This restriction was created to prevent you from ruining your computer by deleting some important file from the Windows operating system.

— Files or folders that you wanted to delete were quarantined by your antivirus program. In other words, your antivirus didn’t like something about them, so it blocked them so that they couldn’t do any harm to your PC.

Ok, we figured out the reasons. Now all that’s left for you to delete your non-deletable file is to simply try all the methods that I described for you below.

How to delete a file or folder that cannot be deleted via a computer?

Method 1. Just restart your computer, in most cases this will be enough.

Method 2. Turn on task manager. Press Ctrl + Alt + Delete if you have Windows 7 or XP and Windows + X if you have Windows 8. A window will appear in front of you, go to “processes”.

All programs that are currently running on your computer will be displayed here. Try to find exactly the one that might use your file. If it doesn’t work, then just select any one at random and click “end process” each time trying to delete the file again.

Method 3. Turn off your computer and turn it on again. During the boot process, press the F8 key many times. A black screen will appear in front of you, where there will be several options to boot your PC. Select " safe mode" As soon as the computer boots, try to delete the file or at least move it to another location.

Method 4. If the file is simply not deleted, but can be transferred, then you can proceed as follows. Just drag your file onto an empty flash drive and format it. Be careful, after this process everything will be deleted from it!

Method 5. Open your computer and find your non-deletable file on the desktop. At the top of the window, click “service”, then “folder options”, go to the “view” tab and uncheck the box if it is next to “use simple” general access to files" and save the changes. Try deleting your file or folder.

Method 6. Change administrator rights. Right-click on our file, select “property”, then in the window that opens “security” and click “advanced”.

Another window will appear, click on “owner”. Here simply select another administrator and click “apply”. Personally, this operation helped me remove restrictions from my WordPress templates, which I wrote about.

Method 7. Disable all processes associated with this file. This procedure is very similar to the task manager, but it has a more effective effect. Click "start" on your desktop, then "run". In the window that appears, enter msconfig and press OK.

Another window will appear in front of you. Here go to the “startup” tab and in the list of running processes try to find the name of your non-deletable file and uncheck it, and click ok.

How to delete files and folders that cannot be deleted using special programs?

Method 8. To solve this problem, a very cool and at the same time simple program“UnLocker”, which is capable of deleting non-deletable files in 90% of cases. You can download the program from the official website. During the installation process, be careful and uncheck the box where you are asked to install another application in addition to the program. If you don’t do this, then at the end of the installation your antivirus program will swear for a long time.

Publications on the topic