The folder with files is not deleted. How to delete a folder on your computer if the system says that it is open in another program

Creating, moving, deleting and other manipulations with files are routine actions that everyone has to perform. However, it happens that you cannot delete a folder that has become unnecessary. The system reports that the operation cannot be completed. If you still need to get rid of the extra folder, you will have to understand what causes such a reaction from the operating system and how to correct this situation.

Let's try to figure it out ourselves. Those for whom this may seem difficult can contact a specialist who performs customer service for computers in your office or home.

Causes and possible solutions to the problem

The inability to delete a particular folder may be due to the following reasons.

Folder corruption

Folder corruption. This may occur due to a software glitch, physical problems on the disk, or due to the destructive actions of a virus. Often it is quite enough to simply restart the computer or scan it with an antivirus.

File is busy

The file is occupied by some program or system process. To verify this, you should open the Task Manager and stop the desired process that is using this file or folder.

Situations often arise that a folder in Explorer appears empty, but it cannot be deleted. The reason may be hidden in the settings of the standard Windows Explorer. The “Do not show hidden folders, files and drives” mode may be activated, so the folders only at first glance seem empty, but in fact service files are stored there. You must make sure of this, otherwise there is a risk of deleting important data.

Lack of rights

The folder contains files, but it cannot be deleted due to insufficient rights to perform this action. The options for correcting this situation are as follows:

  • Use an account that has sufficient rights. You need to re-login to the system under a different user who has administrative rights. After completing all the manipulations, you can log in again under your name.
  • Get rights for your account to delete folders. There is a risk here that advanced rights will not only allow the user to gain greater control over the system, but also a virus that penetrates an account with administrative privileges can cause much more trouble.
  • Use third-party programs to forcefully delete information that has become unnecessary.

Granting administrator rights

A user with normal rights already has sufficient capabilities to freely perform the necessary actions with many folders, without having access to system information. This prevents damage, accidental or intentional, to folders and files that are important for the operation of the OS. Only accounts with administrator rights have these rights.

A good option is to have, in addition to the main account, a second one that has administrative privileges for situations where the rights of the main account are not enough.

If you need to grant extended rights to a user account, then only the system administrator can do this. Next, we will show several ways in which you can, using an administrator account, grant a user greater rights to manage computer resources.

Using system settings

The sequence of actions is as follows:

Using the command line

This method requires some experience, and if you do not have confidence in your abilities and knowledge, then it is best to contact specialists, for example, a company that provides computer assistance in Balashikha or another area closest to you. For the rest, let's continue:

This activated the administrator account, which was usually in an inactive state.

Disabling TrustedInstaller

Windows 7 has a user with even greater rights than the administrator. The TrustedInstaller account protects critical system components. Even the administrator will not be able to delete such information. When you try to do something, a window will appear with the message “Request permission from TrustedInstaller to change this file.”

To bypass this protection, you will have to manually grant the administrator access to the desired file. Sequencing:

Now nothing should prevent you from deleting a folder or file. You should do the same if you need to move any folders to another location. This should not be abused. After completing all the steps, you should return it to the previous owner so that the system can continue to function correctly.

If uninstallation is prevented by a running program

In the event that deletion is impossible due to the fact that the file is occupied by some program, you must either stop this program, or, if it is a system process or a program that simply cannot be stopped, perform some actions.

Editing the Startup list

In order to prevent the launch of a program that blocks the ability to delete the desired folder, you must:

Now, if the interfering application has been disabled, the removal will be successful. If you didn’t get it right with the program, you should repeat the steps and disable what you need.

Using Safe Mode

Another way to delete a folder that is used by some program, or that a virus cannot remove, is to boot the system in safe mode. For this:

The system will now boot into safe mode. After deleting the folders, you should go back to “System Configuration” and uncheck Safe Boot.

There is another way to get into safe mode. When booting the computer, until the Windows startup screen appears, you must press the F8 button. A window should appear with additional download options.

You need to select the line “Safe Mode” and press “Enter”. After downloading, open Explorer and delete everything that is required.

Uninstall using the command line

You can use the command line by opening the MS-DOS terminal window that we mentioned earlier. To delete a file, you can use one of the commands:

  • “del c:\BadFolder\BadFile.txt” – deletes the BadFile.txt file from the c:\BadFolder folder.
  • “del/f c:\BadFolder\BadFile.txt” – the “/f” key allows you to delete a protected file.
  • “del/a c:\BadFolder\BadFile.txt” – using the “/a” key, all files in the folder that contains the BadFile.txt file are deleted.

All names of folders and files must be entered without errors. It will be impossible to restore files deleted in this way, since they will not be placed in the Recycle Bin.

Removal using third-party programs

You can get rid of unnecessary folders that cannot be easily deleted by using third-party applications.

File managers

Most of these programs have built-in tools for deleting protected files and folders. For example, in the popular “Total Commander”, it is enough to highlight the desired file with the cursor, press F8 and, having answered in the affirmative when asked to confirm the deletion, perform this action.

This file manager can delete many protected files, but not all. In some cases, it is better to use specialized utilities.

Unlocker

This convenient and simple program, after installation, creates the “Unlocker” line in the context menu. Having selected a file, just call up this menu by clicking the right mouse button.

The window that appears will show the program that is preventing the deletion of this file. This is convenient because you just need to close the specified program, and you no longer have to perform any “violent” actions to delete the file.

Lockhunter

Another program, very similar to the previous one in capabilities. After installation, a line in the context menu is also created.

All operations that can be performed with the file are presented in the form of large buttons.

The program should be used carefully so as not to accidentally delete files that Windows needs for normal operation.

Fileassassin

This program works a little differently. To delete a file, you need to launch the program and select the desired file in the window that opens.

After the object to be deleted is selected and the parameters for working with it are specified, you must click the “Execute” button.

System Restore

Another way to try to unlock folders or files is to roll back the system to one of the backup points. This method is applicable if such backup points are created regularly. This is a radical remedy, because all changes made to the system since the last point was created will be forgotten.

Procedure:

Using a different OS

An alternative way is to connect the drive that contains the non-deletable files to another computer running Windows or Linux running from its own drive. You can also use a special assembly of the system, the so-called “Live CD”, launched from a flash drive or optical disk, designed to restore and check the main operating system of the computer. You can use boot utilities from antivirus software developers.

From the system's point of view, folders and files of the operating system of someone else's disk are simply objects of the disk's file system that can be easily deleted, moved to another location, etc. It is important not to delete unnecessary things, otherwise, by returning the disk to its place, you can end up with an inoperable system.

other methods

If the files that cannot be deleted are located on a flash drive, external drive, or SD card, then you can use, for example, a smartphone. By connecting a memory card or external drive to it, using an adapter and the necessary applications, you will finally be able to get rid of unnecessary information.

Conclusion

Summarizing all of the above, we will briefly list all the methods for deleting locked files, ranking them from simple and safe to more labor-intensive and requiring caution when used:

  • User level. Closing programs that “hold” a file or folder. Reboot your computer.
  • Windows level. Making changes to startup, removing from safe mode.
  • Changing access rights. Granting administrative rights to the user.
  • Command line. Using low-level delete commands.
  • Use of third party programs. Special utilities and capabilities of file managers.
  • System rollback. Restoring the OS state from a backup point.
  • Using an external OS. Connecting a drive to a computer that is running an OS from another drive.

The inability to delete a folder or a separate application file is a common problem in OS Windows, from the old XP version to the new “ten”. If you're trying to delete a file without closing the program, that's one thing. In this case, it is enough to close the running application, for example, a game, and the issue will be resolved. Well, in other cases, you will need to apply certain actions to solve the problem, using system or software methods.

You often encounter these errors when trying to delete a file or an entire folder:

  • the file cannot be deleted because it hangs in the task manager (occupied by a process);
  • the file cannot be deleted because it is open in some program;
  • Administrator permission is required to perform the action.
There are a number of ways you can delete an unnecessary file or folder. This can be done both using system tools and special utilities and programs.

Before starting the process, make sure that the deleted file will not cause instability in the operating system. When cleaning your computer from unnecessary “garbage”, do not delete system files, without which its stable operation is impossible.

Files occupied by the process can be deleted both by the system itself and by third-party programs. In the article we will tell you and show with screenshots how such files can be deleted in Unlocker, DeadLock and Live CD. The first two programs are free and suitable for untrained users.

If you are trying to remove files such as hiberfil.sys, the methods discussed in this article will not apply to them. In this case, you need to read the instructions for disabling hibernation, the energy-saving mode of the PC operating system, or setting up the hidden system swap file pagefile.sys. Deleting the Windows.old folder may also help.

Deleting a file without additional programs

If a file cannot be deleted because it is occupied by a process, the system will notify you about this. In this case, the notification will contain the name of the process due to which deletion is impossible. Most often, the files are “occupied” by the main process of the Windows Explorer program. And if the file is “freed”, it will be easy to delete.


You can close the process in the task manager. To run it, do the following:
  • If you have Windows XP or Windows 7, press the key combination Ctrl+Alt+Del.
  • If you have "eight" or "ten", press Win+X and select task manager.
See what process is occupied by the desired file. By deleting the task, you can easily delete it.


But to delete a file occupied by the main process of the Explorer program, it is not enough to simply cancel the task. You will only have to remove it using the command line. First, run it, remove the explorer.exe task, and then delete it by typing the del command full_path_to_your file.

Now, to return the standard view of the Desktop, you need to restart the main Windows Explorer process. This is done in the task manager. On the “File” tab, select “Run a new task” and in the window that opens, specify “explorer.exe”.


The process is running again, and the desktop looks standard.

Removing a locked file using a bootable USB flash drive or disk

Boot the operating system from any Live CD, such as a bootable USB flash drive, USB drive, or OS recovery disk. When booting from a Live CD, either the command line or the standard operating system GUI can be used. When you boot the OS from any USB drive, the hard drive partitions may have different letters. To avoid mistakes when deleting a file, it is better to use the dir command. For example, the command "dir d" will show all folders stored on that drive.


If you boot the system from a flash drive or installation disk for “seven” and “eight”, after loading the language selection window or at another stage, launch the command line using the Shift and F10 key combination. But you can also use System Restore. Here you can see a similar situation with changing drive letters, so don't forget to use the dir command as well.

Using DeadLock to Unlock and Delete Files

Many users who previously resorted to using the free Unlocker program are gradually switching to an alternative option - DeadLock. Over the past year, along with the Unlocker distribution, unnecessary programs have been downloaded and installed on the computer without the user’s knowledge. The program is also perceived ambiguously by antivirus programs and browsers.

The free DeadLock utility works on the same principle: it removes the lock and deletes files. The declared functions also include the ability to change the owner of a file, but we have not tested this.


So, how does the program work? If a file cannot be deleted because it is occupied by a program process, launch DeadLock and select File. Now add your file to the program list and click the mouse. Now you have three actions available to you: Unlock, Remove and Move.


The peculiarity of DeadLock is that after unlocking the file, it does not add this action to the Explorer program.

Free Unlocker to unlock files that won't be deleted

Until some time, as we already wrote above, the Unlocker program enjoyed great love from users. It easily, without problems and quickly deleted any file occupied by the process.

Using the program is easy: click on the file you want to delete and unlock it.


The program works the same way as DeadLock: it kills the process and then deletes the file. But it also has distinctive advantages: the program is able to record even those processes that are not shown by the dispatcher.

Why is the file or folder not being deleted?

The official website of the operating system developer corporation provides little information about why it is sometimes impossible to delete certain folders and files.

What may be preventing you from deleting a file or folder?

You may not have enough rights to edit the file and folder and then delete it. The file may not be deleted due to certain PC administrator settings.

Another option is also relevant - when the file works in a specific program. The problem may be resolved if you close all running applications.

Why when I try to delete a file does Windows say the file is in use?

If, when deleting a file, the system displays an error about its use by the program, you need to close it. For example, you want to delete a folder with Word, but you can’t because you are currently working with a document from this program. Therefore, if you close the document, the folder will be deleted. Or you are trying to delete files while someone else is working on them (if you have a home network).

After deleting all files, an empty folder remains

The solution to the problem is closing all programs or restarting the PC.

This often happens when certain files are not deleted. And the system writes that this file or folder is occupied by another process. This can happen both in Windows XP and in Windows 7, 8, 10. Today we will look at methods for eliminating this problem when files are not deleted.


So, imagine, you installed some program on your computer, used it, and you didn’t like it. What are your actions? Of course, delete it. After uninstallation, the program was allegedly removed, but the folder with some program files remained. When you try to delete such a file, an error appears:



Let's look at ways in which you can delete files that cannot be deleted using standard means.

1st method. Simplest
If the file is not deleted, restart your computer and try deleting again. In many cases this helps. If the problem persists, then read below.

2nd method. Task Manager
In the Windows 7 and XP operating systems, to get to the Task Manager, you must press the key combination Ctrl + Alt + Del.
In Windows 8 and 10, just press the Windows + X key combination and select Task Manager from the menu that appears.



The Task Manager we called will open, where you need to find the process that is using the file and remove the task from it. Then try deleting the file again.



3rd method. Using a boot disk or flash drive
The next method is to start the computer from a LiveCD or bootable USB flash drive and then delete the file or folder. In the first case, we need to use the standard Windows graphical interface to find and delete the required file, or use the command line. If you are using a bootable USB flash drive with Windows 7, 8 or 10, then during installation you can open the command line by pressing Shift + F10. There is also “System Restore”, thanks to which you can return the computer to its previous state. By the way, the drive letters may be different, so use the dir c: command to display the contents of that drive. Thanks to this, you can easily understand what kind of local disk it is.

4th method. Deleting files in safe mode
It's very simple here. You need to go into safe mode, find the required file or folder and delete it. In safe mode, only operating system programs are launched, while all your installed third-party utilities (messengers, drivers, antiviruses, etc.) do not start. Therefore, the probability of successfully deleting the required file is very high.

5th method. Using a special Unlocker program
This program, called Unlocker, helps delete files that are used by some process. A very useful utility that copes with its tasks with a bang. You can download it at https://yadi.sk/d/PkczjpOKjbeje

When the program downloads, install it.



Next, select Advanced and uncheck all the boxes,



The essence of the Unlocker program is to unload from RAM the processes that are used by the file. The program can find and terminate a process that is even hidden in the Task Manager. In general, an excellent utility that every system administrator should have.

If you don't have time to delve into the situation, simply restart your computer. In many cases, after a restart, the problematic folder can be deleted in the usual way.

If, when you try to delete, Windows reports that it cannot find the item to delete, an archiver can help you. 7Zip, WinRAR or a similar program will do. Run it and archive the problematic folder, having first checked the “Delete files after compression” option. The program should automatically erase the directory, and you will only have to delete the created archive.

3. Delete the folder using an administrator account

The inability to delete a directory may be related to access rights. In such cases, the system requires a password for the administrator account or simply reports that you do not have the necessary rights. To bypass this restriction, you will either have to immediately enter the requested password, or log in as an administrator and only then delete the folder.

Viruses and other malware can also prevent the folder from being deleted. using an antivirus, and then try to get rid of the directory again.

5. Check that there are no locked files inside the folder

Often it is not possible to delete a folder because the files attached to it are used by certain programs. It is very easy to check whether such a conflict exists: open the directory, select the internal files and try to delete them. If the system refuses to delete one or more objects, using system tools or third-party programs. Then delete the folder itself.

If the standard Explorer refuses to delete an object, try doing it in a third-party file manager. For example, in Total Commander (Windows) or Commander One (macOS).

7. Delete the folder in Safe Mode

If other methods do not help, find the problematic directory and delete it.

Every computer user strives to keep the internal or external hard drive clean by promptly deleting folders with useless files or programs. According to Microsoft recommendations, on the Windows operating system you need to remove unnecessary applications through the built-in utility for adding/uninstalling programs, but not all of the applications installed on the computer are displayed in it.

In most cases, deleting a program or other files in a folder does not cause problems. Just right-click on the folder, select “Delete” and confirm your decision. But deleting a folder does not always go smoothly, and the system may warn that it is unable to complete the operation due to the folder's files being used at the moment. We suggest considering several ways to delete a folder that cannot be deleted in the Windows operating system.

Restarting the computer

The most obvious and simple way to solve the problem with a folder that is not deleted is to restart the computer. Most often, an error with deleting a folder occurs due to the use of files that are located in it. For example, if you launch an image from a folder with pictures, you will not be able to delete it until the program using the image stops accessing it.

If, after closing all programs that could use files from the folder being deleted, the result remains the same and the system reports that deletion is impossible, the easiest way will be to restart the computer, thereby resetting all access to the files.

Closing programs that use files from a folder

If, after restarting the computer, the problem continues to occur in which the folder cannot be deleted, you need to understand which of the files in it is currently being used by the system. Most likely, the folder contains an application that automatically starts after the computer is restarted, thereby becoming used and cannot be deleted.

For example: PicPick automatically starts at the same time as your operating system by default. If this option is not disabled in the application, then after restarting the computer, you will not be able to delete the folder in which PicPick is located. You will need to first close the application, and then proceed to uninstall it.

When an application is not displayed, but errors still occur when you try to delete the folder with it, you need to shut down the program using the Task Manager. To do this, press Ctrl+Alt+Del and launch Task Manager. Next, go to the advanced view of running applications and select the “Processes” column. Find in the list of processes the one that can be executed from the folder you are trying to delete. Complete this process, and then try to erase the folder again.

Virus check

Viruses are the cause of many computer problems. They can sneak into a specific folder and reside in it, causing the user to have problems when trying to delete it.

To make sure there are no viruses in the folder, you need to install an antivirus on your computer. Next, right-click on the folder and select from the drop-down menu the item associated with scanning the folder with an antivirus. If no problems are found during scanning, then the error is not related to viruses.

Formatting a disk with a folder

Often the problem where the user cannot delete a folder occurs with external hard drives or flash drives. If you can't delete a folder from your external drive, you can simply format it.

First transfer files from an external hard drive or flash drive that may be useful in the future to another drive. After this, you can begin formatting the information keeper, as a result of which everything will be deleted from it. In order to format an external hard drive or flash drive, right-click on it in the drive selection list and click on the appropriate item. It is recommended to perform a full format (not a quick format) in order to completely “zero” the information storage device.

Using special programs

To fix the problem where you cannot delete a folder, several applications have been released that can help you cope with this task. An effective program can be called Unlocker, which is distributed free of charge via the Internet on the developers’ website.

The program works very simply - it analyzes the computer and finds processes that use files from the folder. When they are found, the application prompts you to close them, after which there should be no problems with deleting the folder. You need to use the Unlocker application as follows:

It is worth noting that deleting a folder may not be possible not only due to the use of the files located in it, but also due to access restrictions. If a folder is simultaneously accessed from several computers, the system administrator can retain the rights to delete or change files in the folder only for himself. Thus, information from the folder can only be viewed from other computers, but not erased.