Why is the file not deleted from my computer? 5 removal methods

Any computer user has at least once encountered a situation where a seemingly simple procedure, such as deleting a file, ended in failure. If this has not happened to you, then either you know how to prevent this situation, or you still have it ahead. That’s why today we’ll talk about how to delete a file or folder that cannot be deleted, and we’ll give several methods for solving this problem. We will help those who are faced with such a situation to solve it; for those who are new to this, they will be fully armed and ready to deal with undeletable files.

Reasons why a folder or file is not deleted

The inability to delete a file can be explained by several reasons:

  • Insufficient rights to perform the delete operation.
  • The file is being used by another user or program.
  • The folder or file is damaged.
  • The media on which the file of interest is located is protected from writing, and therefore from deletion.

You can solve the problem that has arisen in different ways: use the capabilities that exist in the operating system, or resort to the help of third-party utilities that are designed to perform similar actions. Let's look at all the methods for getting rid of unnecessary files.

You just need to make one caveat - are you sure that the file intended for deletion is really unnecessary? Windows OS protects the folders and files necessary for its stable functioning, and attempts to insist on one’s own way can lead to the “crash” of the system and the need to solve completely different problems. Before you start deleting files, make sure that they are truly “garbage”. You should be especially careful when disposing of objects in system folders.

Removing hidden files

Quite often, it is not possible to completely delete a folder due to the presence of “invisible” data in it: hidden files created by programs or other users. At the same time, other information storage units are usually deleted without problems. You can solve the problem and delete files and folders that are not deleted using standard methods as follows:

  • Open the problematic directory in Windows Explorer and go to the View tab.

  • Check the “Hidden elements” checkbox.
  • And make sure that there are some in the folder.
  • Now, having found a problem, the computer owner will be able to delete first the hidden files, and then all others, including directories, without unnecessary difficulties.

Checking file access

A helpful way to delete a file in some cases is to restart the computer. It is quite possible that the object that needs to be gotten rid of is the result of a particular program that was uninstalled incorrectly, or it was not done completely, and there are some program modules (DLLs, processes) left in the system that are still running and do not allow deletion. It is quite possible that after restarting the system, unnecessary processes will not work and the file will be freed from unnecessary care. Delete.

Another point is the prohibition on performing write/erase operations in this folder, set by the computer administrator. You need to go to the folder properties, and on the “Security” tab check the granted rights.

If read-only is allowed, then you should give full access to this folder, after which it will be possible to perform any actions with all the files located in it. You should be especially careful with system folders.

Reboot to Safe Mode

The first two solutions to the problem did not help, but you still want to delete a file that is damaged or occupied by an unknown process? You will have to try to do this from Windows “safe mode” - the computer owner will need to set the appropriate option and reboot. To do this you need:

  • Open “Control Panel” and go to the “System and Security” section.
  • Next, go to the “Administration” subsection.
  • And double-click on the “System Configuration” shortcut.
  • By switching to the “Download” tab in the new window, the user should.
  • About the "Safe Mode" option.
  • And select the first option “Minimal” for it - otherwise a file that is not deleted may be blocked again by third-party processes.
  • It is likely that you will not be able to delete damaged data the first time. In order not to perform the listed manipulations before each subsequent boot, you should check the “Make these settings permanent” checkbox - in the future, to return to the standard boot, you will need to open the “System Configuration” again and select the “Normal startup” option on the “General” tab.

Now, by successively clicking on the “Apply” and “OK” buttons and restarting Windows, the user can delete files without any extra effort - in safe mode it is as easy as password-protecting a folder on the computer.

Important: when selecting safe mode settings, it is not recommended to leave a tick in the “No GUI” checkbox - having lost the familiar interface, an inexperienced user is unlikely to be able to delete damaged data.

Using Task Manager

If, when trying to delete, a message is displayed that the file is open in another program, and a specific process (program) is indicated, then the situation is somewhat simplified, since it is known what exactly is preventing us from getting rid of the file that has become unnecessary.

To do this, simply close this program (if possible), or stop the running process. To do this, you need to open the “Task Manager”, which can be done by pressing the key combination “Ctrl” + “Shift” + “Esc”. After this, on the “Processes” tab, you need to find the process blocking access to the file and terminate it.

After this, you can try to delete the file. Most likely it will work out.

Unlock the file in use with a special tool

Sometimes a file in use remains locked when it shouldn't. If trying to remove it via the command line doesn't work or the task is too difficult, try one of these tools.

1.Microsoft Process Explorer

Process Explorer is a more powerful File Explorer. Not only does it list all running processes, it can also show you which process has taken your file hostage. Just open Process Explorer Search via Find → Find Handle or DLL (or press Ctrl + F), enter a file name and wait for a list of processes accessing your file.

You can't close a process from the search box, but you can use Process Explorer or Windows Task Manager to close the offending application.

2.Unlocker

Unlocker is used to add yourself to the Windows context menu, which means you can right-click on a file in use and unlock it through the context menu.

If the file is still in use, you can let Unlocker perform the action on the next reboot.

3.LockHunter

LockHunter will add itself to the Windows context menu. Once installed, simply right-click on the blocked file and select What's blocking this file? This should bring up a window showing all processes using the file. You can now select "Unlock", "Delete" (at next system restart) or "Unlock and rename the file". In our case, we were unable to unlock the file, but deleting it on the next system restart worked.

On Windows 10, launch Unlocker, browse for the file, select the file, and click OK. The unlocker will look and (if found) remove the locking handles. Even if it doesn't find the handle, you can use Unlocker to delete, rename or move the file.

Another third-party tool, FilExile, was unable to remove our used file, although it reported success. However, if your file path is too long, you can still try this tool.

Using the Command Line

The file may be held by the “explorer” system process, which is responsible for the operation of the taskbar, desktop, etc. If you simply kill this process, deleting the file may be problematic. At the same time, the command line will allow you to deal with those objects that cannot be deleted using Windows Explorer.

In order to use this tool, you need to launch the command line, for which, after clicking the “Start” button, enter “cmd” in the search field, right-click and select run mode with administrative rights. A window will open in which you must enter commands to delete the file or folder.

You can try to delete the damaged file using this method.

Deleting a file

The "Del" command is used. You need to enter the line:

Del /F /Q /S <Path_to_file>,

Where:

/F – Forces deletion of files marked as read-only.

/Q – do not issue a confirmation request for the delete operation.

/S – delete subfolders and files in them.

The screenshot shows an example. Naturally, your path will be different.

Deleting a folder

To delete an entire folder, use another command:

Rd /S /Q <Path_to_folder>,

Where:

/S – delete subfolders and files.

/Q - do not issue a confirmation request for the delete operation.

An example is shown in the following screenshot.

Disk check

The file may not be deleted due to errors in the hard drive. To correct the situation, the user just needs to run the scan and wait for it to complete - this is only a little longer than finding a program to remove programs that will not be removed. You can proceed to scanning your hard drive as follows:

  • Open Windows Explorer, find in the list the hard drive that contains the damaged files or folders, and right-click on it, then select “Properties” from the context menu.
  • In the window that opens, go to the “Service” tab.
  • Select the “Check” option.
  • And click on the “Check disk” button.
  • Despite the assurances of the operating system, it will restore some of the “incorrect” entries, due to which files or directories are not deleted, without asking the user. Additionally, when checking the system disk, you may need to restart Windows.

Using third party programs

In order to solve all problems with access to files and be able to delete them, regardless of whether they are in use or not, there are a number of utilities specifically designed to unlock objects that need to be destroyed.

FileASSASSIN

A free utility that can be downloaded from this link. Among the advantages of the program are a simple interface, the ability to launch from the command line, unlock and (if such a mode is specified) delete a file.

To get rid of an unnecessary file, you need to specify the path to it, check the “Delete file” box and click the “Execute” button. That's all that needs to be done. If you don’t want to work with the command line, and also don’t want to delve into processes and running programs, then this method is an opportunity to quickly and effectively solve all problems with locked files.

Unlocker

Perhaps the most famous program, known for a long time and often used. You can find it at this link, where there are the necessary versions for 32 and 64-bit OS. There is also a portable version for those who do not like to install many programs on the system, but prefer to run the necessary tools to maintain the system autonomously.

There is one more advantage to using portable versions: when installing such programs, you often install several more utilities, browser extensions, etc., which you don’t need at all, which will annoy you with advertising, and from which, sometimes, you don’t really care. just get rid of it. You have to be careful when installing such software. As a rule, this does not happen with portable versions.

The program itself is extremely simple. When launched, a window will open where you need to specify the location of the file that needs to be deleted.

You just need to click the “Ok” button, after which a new window will appear in which you will need to confirm the action that needs to be performed on the file. If no file locks are found, the following window will appear:

You must indicate what to do with the file - delete, leave as is, transfer, etc.

Other programs

In addition to those listed, there are other utilities that perform the same job. As an example, we can cite: Delete Doctor, Free File Unlocker, MoveOnBoot, Tizer UnLocker, Wize Force Deleter. Their operating principle is similar, so you can choose the one you liked and which helped solve problems with undeletable files or folders.

Antivirus scan

Of course, a file may not be deleted from a computer due to infection with malicious code; This reason is not the most common, but it is common. Since the user will not be able to find out what kind of program is blocking data using standard means, it is worth scanning Windows with any decent antivirus, for example Malwarebytes Anti-Malware:

  • After downloading, installing and launching the application, a user who wants to delete files that are not deleted by standard OS tools must go to the “Scan” tab.
  • And, if time permits, select “Full scan” - it will take, depending on the computer parameters and hard drive capacity, from half an hour to five to eight hours.
  • If you need to delete damaged data urgently, you should prefer “Custom Scan”.
  • Select which drives and for which threats should be scanned, and click on the “Run scan” button.
  • Waiting for the operation to complete.
  • The computer owner will see a list of potentially dangerous data; a file in the Windows working environment may not be deleted precisely because of them. Now you need to tick all the boxes.
  • Or remove them from those that are known to be safe - for example, implying alternative ways to activate the OS.
  • On the “Quarantine” tab, the user can choose what to do with threats: completely remove them or restore them in their original place.
  • Great! The machine is cleaned of viruses and blocking programs. By rebooting the computer or laptop and getting rid of system junk, the user can eventually delete a file that was not deleted using standard methods.
Rating
( 1 rating, average 4 out of 5 )
Did you like the article? Share with friends:
For any suggestions regarding the site: [email protected]
Для любых предложений по сайту: [email protected]