Have you ever tried to delete, move, or rename a file only to be told that it’s currently in use and can’t be modified? It’s a common issue for Windows users, and it can be an immense source of frustration—especially when you don’t know which process is causing the problem.

In this article, I shared how to identify which Windows process is locking a file or folder and why it’s so important to do so. By understanding this issue and the ways to fix it, you can ensure that your Windows files are always secure and accessible.


What is File & Folder Locking in your Windows System?

File and folder locking in Windows systems have an important purpose, providing a measure to prevent multiple users from accessing, editing, and overwriting the same files and folders simultaneously.

This is especially relevant when multiple users are accessing shared resources, as it prevents the potential for data corruption or lost work caused by conflicting edits.

By understanding how to identify which Windows process is locking a file or folder, you can prevent users from accidentally, or even maliciously, overwriting or deleting another user’s work.

Knowing this process is essential to ensure the security and integrity of your file and folders.

Overview of Common Error Messages You might Encounter

When the file or folder is locked and you are trying to do the these actions like editing, deleting, moving the folder to other location, or even renaming a file.

Here is the list of the commonly Windows system warning message you will encounter:

  • There has been a sharing violation
  • The source or destination file may be in use
  • The file is in use by another program or user
  • The action cannot be completed because the file and folder is open in another program
  • Make sure the disk is not full or write-protected and that the file is not currently in use
  • Cannot delete file: Access is denied

How to check which Windows Process is Locking a File or Folder?

There are a few free tools like the Resource Monitor or the Process Explorer which you can download here directly from the Microsoft site. With these tools, you will be able to check which Windows Process is locking your file or folder.

I will show you some examples using these 2 tools

How to Use Resource Monitor to check which Windows Process is locking your file or folder?

In this example, I am trying to delete this Test folder file located in my C drive but it prompted me to this message while trying to delete

The action cannot be completed because the file and folder is open in another program

In order to find out what process is in use that prevents me to delete this folder, simply launch your Resource Monitor by typing in the search or run

And run this application as an Administrator

run resource monitor as administrator

In the Resource Monitor, select the CPU tab and go under Associated Handler and enter the path name to search the process

Based on the result shown above, I am able to see that in my Test folder, there is test.pdf is being locked or used by Acrobat.exe.

To end this process, you can select and right-click the process, and click on the End Process to kill & terminate the process. By doing this, you should be able to delete the folder.

How to Use Process Explorer to check which Windows Process is locking your file or folder?

Similar to Resource Monitor, you will need to run the process Explorer as an Administrator.

After you have launched the Process Explorer as Administrator, go top menu to select Find -> Find Handle or DLL

How to Use Process Explorer to check which Windows Process is locking your file or folder?

You will see a new window popup called Process Explorer Search, in Handle or DLL substring enter the path name eg. C:\Test in the textbox and click on the Search button

Process Explorer Search

The result above shows that this test.pdf is being used by Acrobat.exe hence you are unable to delete the Test folder.


Wrapping Up

If you found this article helpful, share it with a friend who may be experiencing the same issue! If you are experiencing problems deleting, moving, or renaming a file or folder, leave a comment below.