How To Force Delete a File In Windows 10 (7 Ways)

By

Many people can’t delete files and folders on their computer because the Windows operating system may return error messages preventing them from doing so. One common message is “the action cannot be completed because the file is open in another program” This means that there are other programs running that are using the file, folder, or memory space you are trying to delete. To fix this issue, try closing any programs that might affect what you’re trying to delete.

Sometimes when you want to delete a file or folder, Windows may return an error message saying that the operation is impossible or that the file is already in use by another program. There are a couple of tricks to overcome these recalcitrant “undeletable” files. In this article, we will see how to force delete a file on Windows 10.

A false manipulation or bug can leave you with orphaned files that cannot be deleted from Windows Explorer. Sometimes it’s even impossible to move the files or rename them. There are many ways to manually force file deletion natively with CMD, Windows Explorer, or with Unlocker, a software specially designed to force delete files.

Why Can’t You Delete Some Files ?

There are several reasons why you can’t delete a file in Windows 10:

  • The file you try to already being used by an application.
  • The file or folder is read-only.
  • The storage media has a problem or its file system has errors.
  • The PC is infected with a virus.
  • The file or folder to be deleted was created by another Windows 10 user
  • You are trying to delete system files.

Depending on the case, different error messages may be displayed:

  • “Error when deleting the file or folder”.
  • “Unable to delete the file: Access denied“.
  • “File not found”.
  • “Cannot delete a file. There has been a sharing violation”
  • “The action cannot be performed because the file is opened in another program.”
  • “Access Denied, Make sure the disk is not full or write-protected and that the file is not currently in use”

Solution 1: Force Delete A File Using CMD

An effective method to forcefully delete a file is to use the Windows command prompt. This tool is powerful and very effective for certain operations and it often manages to force delete a file that is resistant to Windows.

Follow the steps below to force delete a file in Windows 10 with CMD

1. Click on Start and type “cmd”

Click on the Start button or hit the Windows key on your keyboard and type “CMD”

Type CMD

2. Right-click on “Command prompt” and click on “Run as administrator”

Right-click on the “Command prompt” and run it as administrator.

Run as administrator

3. Type the command “cd” followed by the path of the folder

Type the command “cd” followed by the path of the folder containing the file to be deleted, for example, “cd Desktop”.

4. Type del “your file” and press Enter to force file deletion.

Once in the folder containing the file you want to force delete, type cd “your file” and press enter to delete it. You can use the dir command to list all files in the current folder.

How to force delete file

Solution 2 : Use Unlocker To Force Delete A File That Is In Use

Sometimes when you try to delete a file, Windows 10 says that the file is already in use by another program. Thus preventing you from deleting it.

Unlocker is a software that allows you to force file deletion on Windows 10. Unlocker allows you to delete files locked by “Cannot delete file: Access is denied”, “Cannot delete files” or “The file is in use by another program or user” message errors.

Unlocker is a tool that can force delete a file that is used by another process. It unlocks the file by killing the process that uses it and forcefully deletes the file.

You can force file delete a file using Unlocker by following these steps:

  1. Download and install Unlocker
  2. Right-click on a file and click on Unlocker
    how to force delete file
  3. Click on the “Unlock & delete” button to force delete the file.
    force delete file

This should force delete the file and remove it even if it is in use. If that didn’t work, retry the same procedure using the Force Mode by checking the “force mode” checkbox.

Solution 3: Close All Applications

Sometimes Windows 10 displays an error message like “The action cannot be performed because the file is opened in another program.” when you try to delete a file.

If a file is being used by another program or process, Windows will prevent you from deleting the file until you close the application or process that uses it.

To force delete a file on Windows 10, close all open applications, including those running in the background without a visible window, and try to delete the file again. (Use the task manager to close processes non-critical processes).

Solution 4: Booting In Safe Mode

Safe mode is a mode in which Windows loads only the essentials. It thus works in a lighter version, without being burdened with certain services and programs, and is often used to solve problems.
By booting in Safe Mode, Windows will not start non-essential programs and services that could block the files you want to delete.

To force delete a file in Windows 10, boot in Safe mode and remove your files normally from Windows File Explorer.

Solution 5: Use A File Compression tool.

One way to force delete a file on Windows 10 is by using file compression software, such as 7-Zip or WinRAR to delete the file.

Follow the steps below to forcefully delete a file using 7-Zip.

  1. Open 7-Zip
  2. In 7-Zip, browse through your PC folders to find the file you want to delete.
  3. Select the file and click on “Delete”.
    how to force delete file using 7-Zip
  4. Confirm the deletion by clicking on Yes.

Solution 6: Force Delete A File Used By Another Process Using Process Explorer

If a file is used by a running process, you will not be able to delete it until you terminate the process. Use Process Explorer to identify the process that uses a certain file and terminate it in order to forcefully delete the file. To do this:

  • Download and install Process Explorer
  • Click on Find in the menu, then click on”Find handle or DLL”.
  • Enter the name of the file you want then click the Search button.
  • Process Explorer will then search for the process using your file.
  • Right-click on the process using your file then click on “Kill process”.
  • Once the process is forced to stop. Delete your file normally.

Solution 7: Overwrite the file and delete it

A simple trick to forcefully remove a recalcitrant file is to try to replace it with a file with the same name, forcing Windows to overwrite it.
In another folder than the file to be deleted, create a new empty file with the same name as the file you want to delete. Then copy and paste the created file into the folder where the file to be deleted is located. Windows prompt to replace it, click Yes to overwrite the file, and delete it afterward

See also: How To Split A File Into Several Parts

Related Posts

Leave a Comment