Categories: How to

How to remove locked files and folders in Windows 11

How to remove locked files and folders in Windows 11

Things can get very frustrating if you can’t delete the file / folder that you have been trying to delete for a long time. It might even have tried rebooting the machine! Don’t worry, this is a very common problem that has been reported by many of the Windows users. Mostly this happens with locked files or folders for which you don’t have passwords. However, the solution is definitely not difficult to achieve.

In this article we explain how you can solve the problem of not being able to delete a file or folder in Windows 11, using very simple methods that you can try one by one.

Method 1: Taking ownership of the file / folder

A very useful command that has been around since Windows 7 is the dispossession command, with which you can take ownership of a file or folder to successfully delete it later.

Paso 1: First of all, we need file name that refuses to be erased, with its full path.

For that, the right button of the mouse in the file and then click the Copy as path right-click context menu item.

Paso 2: Then click the Look for on the taskbar.

Paso 3: In the search bar, writes on symbol of the system and then choose Execute as an administrator option as shown below.

Paso 4: As below, copy get the following command at the command prompt and press Pay in wrench. Replace with the path you copied in step 1.

takeown /F <file-name-with-path>

Por ejemplo: takeown / F «E: The Geek Page whatsappIcon.png»

Paso 5: Now if you want to delete an entire folder but it is not removed by right click and delete, just follow the same steps as in step 1 to get the full folder path.

The right button of the mouse in the folder that is not being deleted and then click on the option Copy as path.

Paso 6: The command for taking ownership of folders is the same as for taking ownership of files. But here we have to recursively loop through each subfolder and subfile within the selected folder. So we have to add a few more arguments to the dispossession command.

Please make sure replace with the actual folder path you copied in Step 5.

takeown /F <folder-name-with-path> /R /D Y

Por ejemplo: takeown / F «E: The Geek Page» / R / DY

That is all. You have now taken ownership of the folder and all of its subfolders and subfiles. You can try to delete the file / folder again. If it still doesn’t work, continue to the next step.

Method 2: via Process Explorer

Sometimes the reason you can’t delete a file or folder is that other processes have handles for the file or folder in question. In that case, you need to remove all those identifiers and then try the remove operation again. Process explorer helps you identify which process is preventing the delete operation you are trying to perform.

Paso 1: First of all, we need descargar Process Explorer from the official Microsoft store. You can immediately access the download page here.

Once you are on the download page, just click on the link that says Descarga Process Explorer.

Paso 2: Extract the zip file that you downloaded. Go inside the folder and double click on the executable file procexp64.

Paso 3: When you are prompted to accept the license terms, click the Agree button.

Paso 4: When the Process Explorer window opens, click the Proceedings tab and then click Show details of all processes.

Paso 5: As below, click the Find tab and then click Search identifier for DLL.

Paso 6: At process explorer search bar, write the name of the file or folder you are trying to delete. Hit the Look for button.

Now, click on the first search result.

Now, in the bottom window, you will see an entry highlighted in gray.

Paso 7: Right-click the entry highlighted in gray and click Close the handle option.

Paso 8: When prompted for confirmation, click the Yes button.

You must close the handles for all inputs in step 6. After you have closed all handles, you can try deleting the file or folder again. If it still doesn’t work, continue to the next step.

Method 3: starting in safe mode

If you still can’t delete the file / folder, you can try starting Windows via the safe mode option. In the safe mode option, only essential programs and processes would be running and therefore deleting a file or folder should happen immediately.

Paso 1: First click on the Windows on the taskbar.

Then click on the Can icon.

Now hold down the SHIFT key and then click the Restart option.

Paso 2: Your system will now shut down and then reboot. During the reboot process, you will be taken to the following blue screen.

Click on the option Solve problems.

Paso 3: In the Advanced Options window, click the option Startup settings.

Paso 4: As below, click the Restart button in the lower right corner.

Paso 5: Now you can press the number key 4 to boot into your machine at Safe Mode.

Note: if you want to start safe mode with networking, press number key 5 or if you would like to start in Secure mode with system symbol, then press number 6.

Once you have successfully booted your machine into safe mode, you can try deleting the file or folder again and see if it is working.

Tell us in the comments if you are still having trouble deleting the file.

Miners Hashrate

Recent Posts

Mining RTX 3070 at NiceHash: Overclocking, tuning, profitability, consumption

Mining on RTX 3070. Overclocking, tuning, profitability, consumption: If you are interested in finding more…

6 months ago

Mining GTX 1660, 1660 Ti, 1660 Super: Overclocking, settings, consumption

Mining with GTX 1660, 1660 Ti, 1660 Super. Overclocking, settings, consumption, profitability, comparisons - If…

6 months ago

Mining RTX 2070 and 2070 Super: Overclocking, profitability, consumption

Mining with RTX 2070 and 2070 Super. Overclocking, profitability, consumption, comparison What the RTX 2070…

6 months ago

Mining with RTX 3060, 3060 Ti. Limitations, overclocking, settings, consumption

Mining with RTX 3060, 3060 Ti. Limitations, overclocking, settings, consumption, profitability, comparison Let's look at…

6 months ago

Alphacool Eisblock Aurora Acryl GPX-A Sapphire – test: 2.8 GHz++ are not an issue

Alphacool Eisblock Aurora Acryl GPX-A (2022) with Sapphire Radeon RX 6950 XT Nitro+ Pure in…

6 months ago

Corporate Crypto Strategies 4.0: Leading with Bitcoin Expertise

In the ever-evolving landscape of business strategy, Bitcoin has emerged as a pivotal asset. With…

6 months ago

This website uses cookies.


Notice: ob_end_flush(): failed to send buffer of zlib output compression (1) in /home/gamefeve/bitcoinminershashrate.com/wp-includes/functions.php on line 5420

Notice: ob_end_flush(): failed to send buffer of zlib output compression (1) in /home/gamefeve/bitcoinminershashrate.com/wp-includes/functions.php on line 5420