Can’t delete a file in Windows? Here are eight solutions (2024)

So, you want to clean up your hard drive, but some files just cannot be deleted. Regardless of whether these files are located in a file folder or in the Recycle Bin, when you try to delete them, the same error messages keep popping up. The files are supposedly in use, impossible to access or unavailable. Fortunately, there are ways to force delete a file.

Reasons why a file cannot be deleted

There are various reasons as to why you might not be able to delete a file. Sometimes these reasons are unclear at first due to the system not providing much information about the error. However, in most cases, a Windows error message will provide you with a clear explanation. Windows often provides messages for the following errors:

  • The file or folder is still being used by a program.
  • The file or folder has already been deleted.
  • You are not authorized to delete the file or folder.
  • The program in question is frozen or unresponsive.
  • There are hidden files in the folder concerned.

Options for deleting undeletable files

To force delete a file, use one of the following methods. If the Windows error message has already given you a clear indication of the source of the error, you can immediately choose the corresponding method to be used. However, if the source of the error is unclear, there are still a few tips and tricks that can help you.

Close all programs

In most cases, the reason you cannot delete a file is quite simple. The file or a file from the folder is still open or being used by another program. You should thus follow the steps below.

Step 1: Check whether the file is open in a program such as Word, provided by Microsoft 365.

Step 2: If you can identify the program, close the open file or the entire program.

Step 3: If you cannot identify the program, you need to close all tasks. To do so, open the Task Manager using the following Windows keyboard shortcut: [Ctrl] + [Shift] + [Esc].

Step 4: Quit all programs by right-clicking on the active programs and selecting “End task”. However, be careful not to close the Windows File Explorer and Task Manager.

Step 5: You should now be able to delete the file or folder without a problem.

Restart the computer

If you have closed all the active programs through the Task Manager and the file still cannot be deleted, the program might be frozen or unresponsive.

Step 1: Go to the Windows icon in the lower left-hand corner of the screen and restart the computer.

Step 2: Check if the file still shows up. If it does, try to delete it again.

Remove a deleted folder

If a file or folder cannot be deleted and you receive the error message “Element not found”, this is most likely due to a File Explorer error. To resolve this issue, restart explorer.exe.

Step 1: Open the Task Manager using the keyboard shortcut [Ctrl] + [Shift] + [Esc].

Step 2: Find the “Windows Explorer” task, right-click on it and then select “End task”.

Step 3: Click on the “File” tab located in the upper right-hand corner of the Task Manager and then select “Run new task”.

Step 4: In the “Create new task” window, enter “C:\Windows\explorer.exe” and then click “OK”.

Step 5: If the file in question still shows up, delete it again.

Start in Safe Mode

In some cases, the file or folder can be deleted in Windows Safe Mode. In this restricted mode, background programs that can interfere with deletion are not started.

Step 1: Restart the computer and press the [F4] key during start-up.

Step 2: Under “Advanced start-up” options, select the “Safe Mode” option.

Step 3: Once Windows has started in Safe Mode, find the file, and delete it.

CMD command: del

If you still cannot delete the file, try using a Windows CMD command.

Step 1: Open the Run command line using the keyboard shortcut [Windows] key + [R].

Step 2: Open the command prompt window and enter “cmd” in the command line.

Step 3: Now enter the command “del” in the cmd.exe window, add a space directly after “del” and then enter the name of the file to be deleted. It should look like this:

del filename.fileextension

Step 4: If you do not succeed in deleting the file this way, enter the full file path starting with the drive. It should look like this:

del \\?C:\folder\filename.fileextension

Perform an anti-virus scan

Usually, there is a harmless reason for not being able to delete a file. However, the problem can sometimes indicate the presence of malware. Check to see if the file has been infected.

Step 1: If you have not already done so, perform an update for your anti-virus program.

Step 2: Perform a complete virus scan.

Step 3: If the file is detected as malware and quarantined, delete it. Make sure it is not an important operating system file.

Step 4: If the infected file cannot be deleted, it may be malicious malware. In some cases, an undeletable critical system file may become infected. Consult an expert as you may need to reboot the system if worse comes to worst.

Empty the Windows 10 Recycle Bin to force delete the file

So, you have already moved the file to the Windows Recycle Bin, but the file still cannot be deleted from there. In this case, you will need to empty the Recycle Bin using the command prompt window.

Note

Before deleting everything, you should check whether there are any files you want to recover from the Recycle Bin.

Step 1: Open the Run window using the shortcut [Windows] key + [R]. Then enter “cmd” and press [Enter].

Step 2: Enter the CMD command “rd /s c:\$Recycle.Bin” and press [Enter].

Step 3: The system will now ask you to enter Y or N. Enter Y for Yes and confirm by pressing [Enter].

Step 4: All the files that were in the Recycle Bin should now be deleted.

Note

You might also encounter an issue where you have moved a file to the Recycle Bin, but the Windows Recycle Bin has disappeared. In this case, you will need to first fix the Recycle Bin before you can empty it.

Use free tools

If all your efforts to delete the file using Windows are unsuccessful, there are free tools available that can be used to delete undeletable files. Some of these tools include:

  • MoveOnBoot
  • Unlocker
  • FileASSASSIN

Download the applications and follow the instructions in the software menu to remove listed blocked files. Keep in mind that free software tools may come with malware and privacy risks.

HiDrive Cloud Storage

Store and share your data on the go

  • Store, share, and edit data easily
  • Backed up and highly secure
  • Sync with all devices

Can’t delete a file in Windows? Here are eight solutions (4)

Was this article helpful?

Can’t delete a file in Windows? Here are eight solutions (2024)
Top Articles
Convert $1 per week to Yearly salary | Talent.com
Trader Joes vs. Whole Foods: Are they the same customers for different brands? - RadiantBrands
No Hard Feelings Showtimes Near Metropolitan Fiesta 5 Theatre
It’s Time to Answer Your Questions About Super Bowl LVII (Published 2023)
Global Foods Trading GmbH, Biebesheim a. Rhein
CLI Book 3: Cisco Secure Firewall ASA VPN CLI Configuration Guide, 9.22 - General VPN Parameters [Cisco Secure Firewall ASA]
Chelsea player who left on a free is now worth more than Palmer & Caicedo
Sissy Hypno Gif
What Auto Parts Stores Are Open
Www Craigslist Louisville
Farmers Branch Isd Calendar
WK Kellogg Co (KLG) Dividends
Hover Racer Drive Watchdocumentaries
Hardly Antonyms
Cincinnati Bearcats roll to 66-13 win over Eastern Kentucky in season-opener
Washington, D.C. - Capital, Founding, Monumental
Aspen.sprout Forum
Craigslist Farm And Garden Tallahassee Florida
Arboristsite Forum Chainsaw
Libinick
How To Level Up Roc Rlcraft
Indystar Obits
Melissababy
Quest: Broken Home | Sal's Realm of RuneScape
Sea To Dallas Google Flights
Like Some Annoyed Drivers Wsj Crossword
Hannaford To-Go: Grocery Curbside Pickup
Integer Division Matlab
Utexas Iot Wifi
Discord Nuker Bot Invite
Culver's.comsummerofsmiles
Stockton (California) – Travel guide at Wikivoyage
Darknet Opsec Bible 2022
Page 2383 – Christianity Today
Elanco Rebates.com 2022
Unm Hsc Zoom
Devin Mansen Obituary
SOC 100 ONL Syllabus
Case Funeral Home Obituaries
10 games with New Game Plus modes so good you simply have to play them twice
Craigslist - Pets for Sale or Adoption in Hawley, PA
Devon Lannigan Obituary
Free Crossword Puzzles | BestCrosswords.com
Mitchell Kronish Obituary
St Vrain Schoology
Tommy Bahama Restaurant Bar & Store The Woodlands Menu
Killer Intelligence Center Download
The Machine 2023 Showtimes Near Roxy Lebanon
Pas Bcbs Prefix
How Did Natalie Earnheart Lose Weight
Heisenberg Breaking Bad Wiki
Latest Posts
Article information

Author: Eusebia Nader

Last Updated:

Views: 5348

Rating: 5 / 5 (60 voted)

Reviews: 83% of readers found this page helpful

Author information

Name: Eusebia Nader

Birthday: 1994-11-11

Address: Apt. 721 977 Ebert Meadows, Jereville, GA 73618-6603

Phone: +2316203969400

Job: International Farming Consultant

Hobby: Reading, Photography, Shooting, Singing, Magic, Kayaking, Mushroom hunting

Introduction: My name is Eusebia Nader, I am a encouraging, brainy, lively, nice, famous, healthy, clever person who loves writing and wants to share my knowledge and understanding with you.