Windows 10 sometimes refuses to delete certain folders or file. We’ll show you how to take action in such a case and still erase the affected files from your hard drive.

If Windows 10 refuses to delete a folder or file, this might be caused by two reasons.

Either the affected files/folders are currently being used by Windows 10 or a running software – or you don´t have the rquired permissions to delete the folder/file.

This might be quite annoying if you definitely don’t need the affected files/folders anymore, like in the case of files that had been used or created by an already uninstalled or removed software.

In some cases such files remain “marked” as open / “in-use” or you simply do not have the user-rights to delete them. With the following 3 methods you can still get rid of such files or folders.

Method 1: Delete file/folder as administrator

The most common reason why you cannot delete a file is lack of user rights on the system. If your user account does not have administrator rights, you will need to log in with an appropriate admin account. If someone else is managing your system as an administrator, you will need to contact them.

Method 2: Change file/folder ownership

Some files/folders cannot be deleted by you as a user because another user is marked as owner. As administrator you can set yourself as the owner which is called “taking ownership” in IT-lingo.

To do this, start by right-clicking on the file or folder and selecting “Properties”.

In the properties dialog that appears, switch to the “Security”-tab and click on “Advanced”.

The owner of the file is shown at the top. If you have administrator rights, you can click on “Change” on the right and set yourself as the owner.

A dialog box will pops up. There, just enter your user name in the white box. If you have a Microsoft account connected to Windows 10, this is the corresponding email address, otherwise just your normal user-name. Click on “OK” to apply the new setting.

In the main window you can now see your account as “the owner of the file”. To make the change permanent, you have to close this window as well by clicking “OK” or “Apply”.  If you still can’t delete the file or folder, the last method below will help you.

Method 3: Delete file/folder with Lockhunter

First you install the freeware Lockhunter, which you can download here.  Then click on the file or folder you want to delete and select “What is locking this file?” from the context menu.

In the Lockhunter that opens you can see a list of the processes that are responsible for the deletion lock. With a click on “Unlock Selected Process” you can separate them from the file and delete them afterwards. The big button “Delete It!” does both tasks at once if you wish and removes the file or folder directly from the hard disk.