Can’t delete file? Try these steps


Deleting a file is not always successful. For example because the file is in use or because you have insufficient rights. Get rid of that nonsense. Read here how to always get annoying files in Windows 10 deleted.

There are various reasons for not being able to delete a file. The most common cause is that the file is being used by a program. For example, you’re trying to move a Word document from the desktop to the trash while it’s still open in the word processor. Then the option is simple: close the open file and try again.

It gets more annoying if you don’t know in which program the document was opened or when Windows gives another message for not being able to delete a file. Fortunately, there are several solutions. Of course, these apply not only to annoying files, but also to entire folders.

Task management

Task Manager is a valuable part of trying to delete a file. It gives an overview of all programs that are loaded. You open task manager with Ctrl + Shift + Esc. On the tab Processes look in the section Applications. Here you will find an overview of all open programs. If you do not see an extensive overview, click on first More details.

Does Windows report that a particular file cannot be closed because it was opened in a program? Then find the relevant program and right click on it. Choose To end. All windows of the program are now closed. Try to delete the file again.

Task management

Sometimes it is not a program, but a process that takes the file hostage. You will notice this if you have closed the program and the file is still in use. Use task manager to close the process. On the Processes tab, find yourself in the section Background processes to the process associated with the program. For example: you cannot close a Word document. First close Word. If the program is then still in use, you can also close the associated Word processes (Winword.exe) via Background Processes.

Customize explorer

Windows Explorer offers the possibility to open each window as a separate process. In the past, this option was often checked to make Windows more stable. For example, if one open window freezes, the other windows will remain untouched if you had them open in a separate process. If the windows are opened in the same process, they are all closed.

The setting with a separate process for each window can cause problems when deleting a file. Therefore, disable the option. Open Windows Explorer (Windows key + E) and choose the tab Statue. Choose Options and click on the tab Display. Uncheck the box Open folder windows in a separate process. click on OK. Try to delete the file after this.

Preview off

The preview can also throw a spanner in the works when you try to delete a file. The preview is active in Windows Explorer and shows a preview of a selected file, so you don’t have to open it to view.

Open the tab in the explorer Statue and click the button Preview window. Check if the preview on the right side of the window is gone. The Alt + P key combination also makes the preview disappear.

Disk cleanup

You cannot delete some files intended for the operating system. Then a disk cleanup offers a solution. Open the Start menu and type Disk Cleanup. click on Disk cleanup. In the main window, click Clean up system files. The scan is performed again – but now more extensively. In the results window, check the boxes Temporary files. click on OK.

Command line

For the slightly more advanced user, the command line is a handy alternative for removing annoying files. It is necessary to use the full path to that file. You can do this with the explorer. In the explorer, browse to the file you would like to delete. The full path is shown in the address bar. Double-click it to select the path, right-click it and choose To copy.

Command Prompt

Open the command line from the Start menu. Type Command Prompt and right click on the search result Command Prompt. Choose Run as administrator. On the command line, type the following: CD . To right-click where you want the path to go. It is inserted immediately. Confirm by pressing Enter.

Now close the explorer process to increase the chances of success. Open the aforementioned task manager and right click on it Windows Explorer. Choose To end. In the command line window, type: Del <“bestandsnaam”>. For example: Del “administration.docx”. Press Enter. Chances are that the file will now be deleted. Then restart the closed file process. In task management you choose File, Run New Task. Type Explorer.exe and click OK.

Safe mode

By starting Windows in safe mode, you increase the chance that you can still delete the file. Safe mode starts Windows in the most tidy environment possible and thus prevents programs from loading automatically (and then taking your file or folder hostage).

Open the settings window: click on start and click on the gear on the left, or use the key combination Windows key + I. Go to Update and Security, System Restore. Bee Advanced boot options click on the button Restart now. At startup, choose to have Windows start in safe mode. Immediately after starting up, you can still delete the file.

Try Process Explorer or LockHunter

Can’t delete the file yet? There are many external helpers to help solve the problem. With Process Explorer – from Microsoft itself – you determine which program or process has opened a file or folder. Download the latest version of Process Explorer here. You can use the program for free.

Extract all compressed files before getting started with Process Explorer. After installation, open it by double clicking Procexp64.exe. In the main window you will find all processes that are currently active. To find out which program or process a file is using, use the built-in search function of Process Explorer.

Choose File, Find Handle or DLL. You can also click on the binoculars icon. In the box Handle or DLL substring type the filename. Then click on Search. The search may take a while: Windows loads a lot of processes in the background. Look in the results window Process which programs or processes hold your file or folder hostage. Then open task manager and terminate these programs.

Process Explorer

LockHunter also helps determine which program a file is using and integrates closely into the Windows user environment. Right-click on the file and choose What’s locking this file. An overview of programs and processes that claim the file appears. Then you have multiple options, such as unlocking the file and deleting the file.

click on Other for additional functions. With Delete At Next System Restart delete the problem file after Windows restarts. With Unlock & Rename you can immediately rename the file. With Unlock & Copy you can copy the file. click on More details to check if there is additional information about the process. You can use LockHunter for free. During installation, make sure that the program does not co-install other programs without being asked.

Lockhunter

Caution is advised when using LockHunter. Before you delete a file, make sure that it is not an essential (system) file. If you accidentally delete a wrong file, it can lead to a damaged system.

Ownership

After all, problems with file ownership (or better known ‘ownership’) also occur regularly in Windows. For example, you can’t move or copy a file or folder because Windows thinks you don’t have the right permissions to do so. This happens, for example, when you are working with a file that has been created by another user, but after this user has been removed from the system. By “appropriating” the file yourself, you solve the problem.

Open the explorer and browse to the folder or file you want to claim ownership of. Right-click on the item and choose Properties. On the tab Security click Advanced. The Advanced Security Settings window appears. Click on now Modify. You will find this option on the line Ownerat the top of the window. click on Advanced and choose the user account with which you want to access the file or folder. click on OK and close these windows.

Now right click on the file or folder again and choose Propertyn. Select the tab Security and click Advanced. click on Add. Click Eand principal and select the account you want to access the file with. click on OK and add Basic Permissions a check mark Full management. click on OK. To make this setting also apply to all subfolders, check the box Replace all permission entries on child objects with inheritable permission entries from this object. Confirm with OK.

Test folder

Dive deeper into Windows 10 and completely customize the operating system using our Tech Academy. Check the Windows 10 Manage online course or go for the Windows 10 Management bundle including technique and practice book.

.

Recent Articles

Related Stories