Easy Ways to Delete or Rename Locked Folders and Files on Windows

Deleting files from a computer is an easy procedure, but some files may make the process more difficult than it needs to be. The file may be locked and cannot be deleted because it is being used by a program, the Windows operating system, or for another reason.

When you try to delete a file, you might encounter an error message indicating that the program is using the file. You may not make any changes to this file, including deletion.

file zip

When a file is classified as being used by Windows, it is usually still opened by another process, which may be changing it. In many cases, Windows even redirects you directly to the program in question in the error message allowing you to close it and try again.

When a file is opened by another application or process, Windows puts the file in a locked state, and you can’t delete, change, or move it to another location. Usually, once a file is no longer in use, the app will unlock it automatically, but that’s not always the case.

Sometimes, the file doesn’t open successfully even though you try to take any action. You will see a warning that the operation could not be completed because it was opened by another program. When it’s locked, Windows still allows other users or processes to access it at any time.

When a file or folder is locked, Windows prevents users from writing, deleting, or modifying existing content. This tutorial will show you how to delete locked files and folders with various methods.

How to Delete Locked Folders and Files in Windows

If you need to delete a locked file, here are some methods you can use to unlock it.

  1. Close all programs or applications.
  2. End Application via Task Manager
  3. Restart your computer.
  4. Force Delete Used Files via Command Prompt.
  5. Remove it with a third-party app.

1] Close all programs or applications

The first and easiest way you can do this is to close all open apps. It may be locked and can’t be deleted because the file is still in use by the app you’re currently using.

2] End Application via Task Manager

If you’ve closed all apps and you still can’t delete them, it may be because Windows Explorer is accessing those files. Or when you close apps, they won’t close, you can force them to close by using Task Manager.

To open Task Manager, right-click on the Windows system tray and select the “Task Manager” option. Alternatively, you can use keyboard shortcuts by using keys (CTRL + SHIFT + ESC).

task manager end task

Now, you will see a list of running applications. Then, select and right-click on the app that’s causing the file to lock and select the “End Task” option to force close the app.

You can move all other files in the folder to a temporary folder and then delete the folder that contains the files that cannot be moved, but if this still does not work, try closing Windows Explorer or File Explorer.

If you suspect the cause is “Windows Explorer“, this happens quite often. Select it and right-click, then select the “Restart” option. This is because Explorer is also responsible for the start menu and taskbar. And if you select “End Task”, you need to restart Explorer by clicking the “Run new task” button, then type “explorer.exe” and press Enter.

3] Restart your computer.

The next step you can do if it still fails to delete locked files is to restart your computer.

Rebooting also cleans RAM and possibly fixes other glitches at once. Restarting is the easiest way to free your computer from these distractions. You can try this method if you don’t want to bother to find out the cause.

If you have tried rebooting, and it did not help, proceed to the next option.

4] Force Delete Used Files via Command Prompt.

To delete a locked file using Command Prompt, follow these steps to do so:

  1. Run “Command Prompt” as administrator.
  2. Type the command “del /f file_name” and press “Enter.” File_name is the name of the file you are going to delete.

Note that files deleted using Command Prompt can’t be retrieved if you change your mind.

5] Remove third-party apps.

If you’re looking for an easy method to unlock files so you can delete them normally, one of the next easiest ways is to use a free program like Unlocker.

Unlocker is a free program that allows you to take control of your files and gives you the necessary permissions so you can easily delete locked files.

You can download Unlocker on:

RELATED ARTICLES

Latest Articles