How to remove locked files and folders in Windows 11

1 Icono de búsqueda optimizado

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.

2 Cmd Run as administrator optimized

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»

Read This Now:   How to know what version of Windows 10 I am using + Tips and Tricks

4 Optimized Takeown file

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.

5 Copy as optimized route

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

6 Property folders optimized

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.

Read This Now:   Pwn2Own 2022: Windows 11, Ubuntu, Firefox, Safari, Tesla and more hacked

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.

7 Download Process Explorer Optimized

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

8 Optimized Procexp64

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

9 Optimized license agreement

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

10 Show process details

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

11 Find identifier or optimized 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.

12 Search optimized identifier

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

13 Optimized closing handle

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

14 Confirmation of optimized handle closure

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.

Read This Now:   How to Unarchive a Group on Telegram to Receive Notifications Again?

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.

15 Optimized Shift Restart

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.

16 Continue Troubleshoot Optimized Startup Repair

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

17 Optimized startup settings

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

18 Startup Settings Restart Optimized Startup Repair

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.

19 Startup configuration options Safe mode 1234 Optimized startup repair

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.


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