How to Force Windows to Delete a File


Although there are usually several ways you can delete a file on your Windows system, you'll run into problems if the file is locked. Windows locks or restricts access to a file in order to prevent more than one user or application from deleting or altering it. Also, after you close down an application or it crashes, software bugs may prevent it from releasing files in a timely manner. No matter why a file is locked, however, there are multiple methods you can use to force Windows to delete a locked file.

Close the Application Using the File

  • Examine the file extension to determine which application it may belong to. For example, a file with a .docx file extension is probably being kept open by Microsoft Word.

  • If you can't determine the application from its file extension, right-click it, click "Open with," and then see what application options Windows gives. For instance, a file with a .html extension may be opened by Notepad, WordPad or an HTML editor like Dreamweaver.

  • Close the application that is currently using the file and then try again to delete it. If the file is no longer in use, you can delete it.

FileASSASSIN File Unlocker

  • Download FileASSASSIN directly from the Malawarebytes website (see Resources). Double-click the downloaded file to install FileASSASSIN and then run it.

  • Click the ellipses button to launch the file manager. Navigate to the folder containing the file you want to delete.

  • Select the locked file and then click "Open."

  • Check the "Unlock locked file handles," "Unload modules," "Terminate the file's process" and "Delete file" check boxes. With these options selected, FileASSASSIN is free to shut down any program, dynamic library or system process that is preventing your file from being deleted.

  • Click "Execute" to delete the file. Once the file is deleted, FileASSASSIN will display the message "The file was deleted successfully!"

Using IObit Unlocker

  • Download and install Unlocker directly from the IObit Website (see Resources). Launch Unlocker and then click “Yes” to give the program permission to make changes to your system.

  • Launch Windows File Explorer and then locate the file you want to delete.

  • Drag the file to the text box in IObit and then click "Add."

  • Click the downward-facing arrow next to the Unlock button, select "Unlock & Delete" and then click "OK" to delete your file.

Unlock With LockHunter

  • Download LockHunter directly from the LockHunter Website (see Resources). Install and launch the program.

  • Click the ellipses icon to launch the file manager, click "Browse for a file" and then navigate to the folder containing the file you want to delete.

  • Select the locked file and then click "Open."

  • Click "Unlock It" and then "Delete It" to remove the file.

Tips & Warnings

  • Sometimes the fix can be as simple as restarting your system and trying again to delete the locked file. If a program or operating system process crashed or closed improperly, you may not be able to close the file from the Desktop or by using the Task Manager. Rebooting gives you a fresh start and a new opportunity to delete your file without interference.
  • When you delete a file with File Explorer or from the command line, the actual data is not immediately erased from your drive. Instead Windows simply removes a reference to the file from its database. Your data is not truly gone until Windows decides to reuse some or all of the physical disk space the file occupied. You can permanently delete your files using an application like Microsoft's SDelete (see Resources). SDelete will delete the file, overwrite its data and change the file's name so that data recovery applications can't reconstruct it.


  • Photo Credit moodboard/moodboard/Getty Images
Promoted By Zergnet



You May Also Like

  • How to Remove Unwanted EXE Files

    The .EXE file type on your computer allows you to "Execute" a program or install a new application on your PC. There...

  • How to Force-Delete in Mac OSX

    Deleting your Mac Trash by simply clicking the "Empty Trash" button in the Trash folder does not always work. If a file...

  • How to Delete a Dll File

    Windows relies on several .dll files, also known as Dynamic Link Library files, to perform common functions. From time to time, you...

Related Searches

Read Article

Geek Vs Geek: Robot battles, hoverboard drag race, and more

Is DIY in your DNA? Become part of our maker community.
Submit Your Work!