How to Force Delete Folder/Files in Windows 10?

Deleting a file or folder in Windows 10 is generally quite easy. You just have to right-click on the item you want to delete, and from the context menu, select the Delete option. You can also delete a file/folder permanently by selecting it and pressing the Shift+delete keys.

However, some files or folders are stubborn. Whatever you do, how many times you do, they won’t get deleted. Generally, they show ‘Folder/File In Use’ error. 

To fix various Windows 10/11 problems, we recommend Outbyte PC Repair:
This software will repair common computer errors, protect you from file loss, malware damage, hardware failure, and optimise your computer for peak performance. In three simple steps, you can resolve PC issues and remove virus damage:

  1. Download Outbyte PC Repair Software
  2. Click Start Scan to detect Windows 10/11 issues that may be causing PC issues.
  3. Click Repair All to fix issues with your computer's security and performance.
    This month, Outbyte has been downloaded by 23,167 readers.

It means that some other application is using that file. Similarly, if you are unable to delete a folder, then it means the folder contains a file which is in use. When a file is in use, you can not delete it until the program which is using that file is closed. Sometimes it can be challenging to find the program that is preventing the file from being deleted.

Well, you need not worry anymore. We are presenting two simple methods by which you can easily force delete the files and folders used by an application.

Force Delete Files and Folder Using Command Prompt

On Windows, where would you go to perform the otherwise hard to execute tasks? The answer is quite simple – Command Prompt.

For Windows users, when the going gets tough, the Command Prompt gets going. Using Command Prompt, you can delete any folder or file; it does not matter whether an application is using it. The most essential thing to keep note of is you can delete the file/folder using a single command line. 

In this example, you can delete a file/folder using cmd. Here are the steps to do it.

  1. Copy the Path

    Copy the path of the folder which you want to delete
    Copy the Path

  2. Run Command Prompt as Admin

    Type Command Prompt on Windows search box. Right-click on its icon and select Run as Administrator.
    Open Command Prompt as Administrator

  3. Reach to the Desired Drive

    On command prompt first, reach to the drive where the folder which you want to delete is present. Type “F:“, in place of ‘F’, put your drive letter.

  4. Reach To the Desired Path

    Now execute this command to reach the path where that folder is present: 
    cd “F:\MyData”

  5. Execute the Command

    Execute the following command to delete the folder: 
    del /s /q “Undeletable”.
    In this case, we are deleting the folder named Undeletable. You can put the file name, which you are deleting in place of Undeletable, along with its extension. For example, if you are deleting a zip file, do not forget to write .zip after the filename.
    Execute Command

  6. Folder Deleted

    After executing the command, if the folder gets deleted, the following message would be shown:
    File Deleted

Note that the file Undeletable.exe was inside the folder Undeletable, so it also gets deleted.

This method deletes the file completely and data cannot be found in recycle bin. If you want to recover such accidentally deleted file, use tools like MiniTool Data Recovery.

Force Delete a File/Folder in Windows 10 Using Safe Mode

In Safe Mode, most of the applications are stopped, so there is an excellent chance to delete a file/folder that could not be deleted because an application is using it.

1. On your Windows 10 system, enter the safe mode. Go to Start -> Settings -> Update & Security -> Recovery -> Restart now(under Advanced Startup) to enter the Windows recovery environment. 

2. After the PC restarts, you would be on Choose an option screen. Select Troubleshoot Advanced options > Startup Settings > Restart

3. In the Startup Settings, press F6 to enter Safe Mode with Command Prompt.

Enable Safe Mode with Command Prompt

4. After entering the Safe Mode, perform the normal delete action. You should be able to delete the file or folder quickly.

Change the Ownership of File or Folder

Sometimes the File or Folder refuses to get deleted because you are not the owner of it. In that case, you have to first transfer the ownership of the file to yourself and then try to delete it. Here are the steps for that:

  1. Right-click on the file that is refusing to delete and choose of a file
  2. Under the Security tab, select Advanced settings.advanced security settings
  3. On the right side of the owner, click on Change.change owner of file
  4. Type your username to transfer the file’s ownership to yourself. Click on Check Names to ensure that the user exists. Lastly, click OK. Close the user
  5. Again, right-click on the file and select Properties.
  6. Under the Security tab, click on Edit to change the permissions of the file.edit permissions
  7. Checkmark the Allow option next to the Full Control. Click Apply and OK.Allow full control
  8. Try deleting the files now.

Find out which Process is Using the Folder or File

Sometimes files or folders refuse to delete as a process is using them. You can find out which process is using the folder and end it. Here are the steps for that:

  1. On the windows search bar, type Resource Monitor and click on its icon to launch.Resource Monitor icon
  2. Under the CPU tab, use the search field in the Associated Handles section for finding the process. Associated handles
  3. Here Test folder is searched to find out which process is using it.Process using the test folder
  4. Right-click on the process and choose End Process.end process
  5. Try deleting the folder or file now

Final Words and FAQs

We find these two working methods to force delete a folder or file in Windows 10. Before performing the deletion, make sure that the folder or file you are going to delete is not essential. Remember, once deleted, you won’t be able to recover the file.

How to delete an undeletable folder?

To delete the undeletable folder, follow any of the two methods mentioned in this guide. These methods are self-tested on Windows 10 version 1909.

How to force delete a File?

The procedure to delete a stubborn file is the same as deleting a folder. In place of the folder name, type the file name with its extension to delete it.

Why can’t I delete the files on Windows 10?

The reason you are not able to delete a file on Windows 10 is that an active application of Windows may use that file.

4 thoughts on “How to Force Delete Folder/Files in Windows 10?”

Leave a Comment