Call us: +1 (800) 972-3282

Solved: Can’t Delete File in Windows 10

No matter how large the capacity of the computer’s internal hard drive may be, sooner or later we all run into the out-of-memory-space issue — often just when there is an urgent need to install a program required for work or to transfer data from an external storage device. Of course, deleting unnecessary files and folders would be the easiest and most feasible solution for the average computer user to optimize storage and release some space on the disk. But while wiping the memory from junk and outdated information, one may encounter a challenge where a file won’t delete — whether or not being accompanied by a system error message. Why does this happen, and how to delete files that cannot be deleted?

 

Common Reasons Behind the “Can’t Delete File/Folder” Problem


The key to solving any problem always lies in the causes of its occurrence. On rare occasions, the reason for a file becoming locked from deletion may involve a virus attack. Most modern Windows computers and laptops, however, come equipped with a whole suite of built-in antivirus defenses that makes it almost impossible for your machine to get infected with malicious software. In summary, if you are not in the habit of clicking on suspicious URLs from spam messages or emails from unknown senders, and follow up on timely OS updates, the most likely reason behind the issue is that the file is currently being used by a system program or other application.

 

When a file or folder is opened by an app or background process, Windows 10 puts it in a locked state that hinders the user from modifying, relocating, or deleting it. Under normal circumstances, the file is unlocked by the program automatically as soon as it is no longer in use. Sometimes, however, the system fails to successfully accomplish the unlock process, which may result in the file deletion operation being impossible to complete — typically with a corresponding error message showing up. Below you can see the list of the most common culprits that potentially lead to such a scenario:

 

  • The file/folder is being used by a Windows background process that you can’t see;
  • You are attempting to erase system files that cannot be deleted;
  • The file/folder is corrupted;
  • The file/folder is in read-only status;
  • The disk is write-protected or full;
  • The disk is corrupted;
  • The Recycle Bin is corrupted or full;
  • Malware or virus infection of the file/folder.

 

How to Force Delete File or Folder in Windows 10

 

Before taking actions to solve the issue of undeletable files, make sure that you have:

 

  • ended all applications via the Task Manager and closed all programs;
  • rebooted your computer;
  • scanned your machine with an antivirus to check the system for malicious programs and get rid of them, if any were found;
  • removed write-protection on the device (if you can’t delete file from SD card, USB pen, or external hard drive);
  • checked the file properties to assure that the disk/file is not in read-only state,

Then try removing the obstinate file again. If the problem persists and you still can’t delete file or folder, proceed to the instructions described below.

 

Solution 1: Force deleting files/folders with CMD

 

Let’s start with an easy one. If a file or folder won’t delete from your computer, you can try forced removal via Command Prompt, or CMD. While his solution is universal, it can be used not only on a Windows 10 computer, but also for wiping files from an external hard drive, SD card, USB stick, etc.

 

Using DEL command:

 

Step 1: Click Start menu and type cmd; then right-click Command Prompt app and select Run as administrator from the menu list.

 

Step 2: Once in the Command Prompt window, type del file path, replacing the “file path” piece with the actual location of your target file. In this way, the command del C:\Users\mini\Desktop\test.txt shown in the example below would delete the TXT file named “test” located on our desktop.

 


Step 3:
Hit Enter to execute the command.

 

Please note that the file extension (.txt, .jpeg, .docx, .xls, whatever) must be included in the path. You can get the full path to a file or folder by simply right-clicking it and selecting Properties.

 


Using RMDIR /S /Q command:

 

Step 1: Click Start menu and type cmd; then right-click Command Prompt app and select Run as administrator from the menu list.

 

Step 2: Type rmdir /s /q folder path in the Command Prompt window that opens, replacing “file path” with the actual location of your target file as you did in the previous step.

 

Step 3: Press Enter to execute the command.

 

Solution 2: Running Windows 10 in Safe Mode to Unlock and Delete Files

 

In case you can’t delete file or folder in Windows 10, it is worth trying to do it while in Safe Mode. This method can be particularly useful if you aren’t sure which process is currently using the file, or in case your computer was infected with a virus.

 

Step 1: Enter into the Windows recovery environment by clicking Start > Settings > Update & Security > Recovery > Restart now (under Advanced Startup).

 

Step 2: Click Troubleshoot > Advanced options > Startup Settings > Restart.

 

Step 3: Once in the Startup Settings window, press either F4 or F5 to boot into safe mode in Windows 10.

 


Step 4:
Attempt to erase the file or folder while in Safe Mode.

 

Step 5: Restart your computer so it will auto exit Safe Mode.

 

If you decide to deal with the problem of undeletable files in a drastic way, i.e. by wiping the entire partition, make sure that you have an up-to-date backup for all important data that is stored on your PC, laptop, or external storage media. Once you start the erasing process, you won’t be able to undo it until it’s complete. Also, don’t forget to check the folders again to avoid losing data.

 

Solution 3: Using Shift + Delete to Force Remove File/Folder

 

If a file won’t delete, selecting it and pressing Shift + Delete keyboard shortcut is another way to erase the data permanently. This file removal method isn’t going to pass the Recycle Bin. Also, in case the file has been corrupted or your Windows 10 machine reports that the file/folder can’t be found, you may need to perform a disk repair to see if it can work around the error and fix the corrupted system files. Here’s how to do it using the CHKDSK command:

 

Step 1: Press the Windows + R key combination to launch Run Window.

 

Step 2: Next, type cmd in the window that opens, and hit OK.

 

Step 3: Once in the command prompt window, type in chkdsk # (where # is the letter of the damaged drive) followed by the parameters / f / r. Make sure all attributes are separated by spaces, like this: chkdsk #: / f / r.

 

Step 4: Hit Enter to execute the command.

 

Once the CHKDSK repair process is over, you can type Exit for closing the command line window and go check if the “folder won’t delete” error has been fixed. 

 

Solution 4: Resorting to third-party software

 

The Internet is full of various solutions to any issue or query a user may have, including innumerable third-party applications and tools for repairing corrupted data that can help you delete locked files. Typically, these are lightweight programs with a simple, intuitive interface that even the most inexperienced user can easily navigate, so no instructions are required — just pick the option you feel like trying your luck with, and hit the Install button.

 

Along with this, we strongly recommend users who do not have reliable anti-virus software on their computers to refrain from this option, since a lot of these third-party utilities come with malicious software on board, meaning that the situation is only likely to get worse.

 

Summarizing

 

So, in this article we have covered a selection of the most effective remedies to combat the annoying issue of unremovable files. At the same time, if none of the above solutions worked and you can’t delete file as before, it may be a symptom of severe file system corruption or a sign of a failing disk, which potentially compromises all of the crucial data stored on your PC.

 

With a great experience in data recovery from all kinds of drives and media storages, we would be happy to offer you a quick and accurate diagnosis of your device absolutely free of charge. Providing top-notch data recovery services of any complexity for nearly two decades already, SalvageData remains trusted by numerous industry experts all over the world, which means you can count on us regardless of the drive model and the amount of data to be restored. If you still have questions on the subject of the article, or want to know something specific about our facilities, just call us at +1 (855) 901-1061, or leave a request online so our Customer Support Team can contact you at a time that is most convenient for you.

Share