3 Ways to Find Which File or Folder is Currently in Use in Windows 11

 

Every now and then, as you’re deleting files and folders, Windows may throw up an error message telling you that “the action can’t be completed because the folder or a file in it is open in another program”. This is a major inconvenience, not least because Windows never tells you exactly which program is using this file.

To that end, today, we’re looking at how to identify and release the lock on the file or folder that is keeping you from finishing the job.

Note about Windows 10 compatibility: Although the screenshots used in this guide are of Windows 11, the methods mentioned herein work equally well on Windows 10, too.

3 ways to find which file or folder is currently in use

Here are the two top ways to find which file or folder is being used by an app or service on Windows 11.

Related: A final guide to Windows 11 Shortcuts

Method 1: Using Microsoft Process Explorer

Microsoft has a ‘Process Explorer’ app that is much more powerful than Task Manager at identifying the application that’s locking the file or folder and keeping you from making changes to it. 

Download: Process Explorer

  1. Go to the above link and click on Download Process Explorer.
  2. Once downloaded, right-click on the zip file and click Extract all.
  3. Select the location for the extraction, then click on Extract.
  4. Then run the executable file for Process Explorer.

1.1 How to find which program is using the file/folder

  1. Once Process Explorer opens up, you should see a ‘crosshairs’ icon in the toolbar at the top.
  2. Drag this icon and drop it on the “File/Folder In Use” error message.

This will highlight the Process Explorer in the processes display list.

1.2 How to unlock the file/folder

  1. Once the process is highlighted (in blue), you will see exactly which application is locking it from being changed or deleted (in purple).
  2. To unlock it, you will have to kill the process highlighted in purple. To do this, click on the program to select it.
  3. Then press the delete key. When asked to confirm, click OK.

Now you can delete, rename, or otherwise edit the file as you please.

Related: How to Use Focus Assist on Windows 11

Method 2: Using Resource Monitor

Windows has an in-built tool called Resource Monitor that lets you find the application locking files and folders. Here’s how you can go about using it:

  1. Press Start, type ‘Resource Monitor’, then select the first option.
  2. In Resource Monitor, click on the CPU tab to switch to it.
  3. Then click on the ‘Search Handles’ field next to Associated Handles.
  4. Search for the file or folder that is being restricted. In our case, it’s a movie file. As soon as you type the file/folder name (even a partial name would suffice), you should see the application that is locking the file from being deleted.
  5. If you want to end this process right here, right-click on it and select End Process.
  6. Click on End Process when asked to confirm.

Your file is now unlocked and you can make the changes to it as you wish.

Related: How to Check Battery Health Windows 11

Method 3: Using File Locksmith by PowerToys

PowerToys offers a variety of utilities, one of which is File Locksmith which lets you find out which process, app, or software is using a file. What separates it from the rest is its simplicity as you can find it out from the context menu itself. Here’s how to use it:

  1. Download PowerToys and install it. 
  2. Open PowerToys and select File Locksmith on the left. Make sure that it is enabled.
  3. Now, simply right-click the file in question, select ‘Show more options’ and click on What’s using this file.
  4. If the file is being used anywhere, you’ll see it in ‘File Locksmith’s’ window. To free it up, simply click on End task.

How to Fix the “File in Use” error

If the aforementioned methods don’t work for you and you are still not able to make the changes or delete the file/folders, then the problem may lie elsewhere. Here are a few potential fixes that you can try to solve this issue.

1. End application from the Task Manager

The first (and perhaps the simplest) thing that you can do is to close the application that has locked the file. Of course, you need to know which application is using the file in the first place (see Methods #1 and #2 above for the same). 

Open Task Manager by pressing Ctrl + Shift + Esc simultaneously, and make sure you’re on the ‘Processes’ tab. Look for the program that’s keeping your file hostage, right-click it and select End task.

Doing so will end all instances of the program. Try making changes to the file/folder now. In most cases, this should do the trick and free your file/folder.

2. Check File Properties (uncheck Read-only)

Sometimes, the problem lies with the file itself. It’s possible that the file that you’re trying to make changes to is a ‘read-only’ file. That means other than opening it in an application, you can’t do much.

  1. To check this, right-click on the file and select Properties.
  2. Under the ‘General’ tab, find ‘Attributes’ at the bottom. If there’s a check placed next to Read-only, it’s possible that this is what could be causing problems.
  3. To rectify this, uncheck the ‘Read-only’ option and click OK.

Note: If the option is greyed out or you are not able to uncheck it, you may not be the owner of this file and may not have permission to do so.

3. Force delete the file from the Command Prompt

If you’re looking to delete the file and are hampered by an unknown application, you can try force deleting it from the Command Prompt. Here’s how:

  1. Navigate to the folder where the file is located. Right-click on the folder and select Copy as path. Our file is within the ‘Videos’ folder so we’re right-clicking on the ‘Videos’ folder and then selecting ‘Copy as path’.
  2. Then, open the Command Prompt by pressing Start, typing cmd, and clicking on Run as administrator.
  3. Now, go to the directory of the file, type cd, and then press Ctrl + V to paste the path that we copied earlier.
  4. Then hit Enter. This will change the directory to the folder that contains your file.
  5. Now, before we move any further, we have to end the Explorer process temporarily. To do this, press Ctrl + Shift + Esc simultaneously. Find Windows Explorer from the list of processes, right-click it and select End task.
  6. Go back to the Command Prompt (use Alt+Tab to find it). Now enter the following command to force delete your file: del "filename"
    Make sure to replace “filename” with the complete name of the file, including its extension. Then press Enter.
  7. Now, it’s time to bring back Windows Explorer. To do this, open Task Manager (as shown before), click on File > Run new task.
  8. Type “explorer.exe” and click OK.

You will now be able to make changes to your files and folders. 

4. Restart your computer

Sometimes, as simple a thing as restarting the computer can do the trick. Restarting gives your system a soft reset, allowing applications to load from scratch. It’s possible that you might be able to edit or delete your files after a simple reboot. Although not guaranteed to work in all cases, you’d be surprised at what a simple reboot can do. 

5. Boot into Safe Mode and delete the file

If you’re still unable to delete the file or otherwise make changes to it, you can try booting Windows into Safe Mode and making the changes from there. If you’re unsure how to boot into Safe Mode, follow the steps below:

  1. Press Start, click on the Power button, and then, while pressing the “Shift” key, click Restart.
  2. Now, while the computer is restarting, you will be taken to the Advanced Restart options. Select Troubleshoot.
  3. Click on Advanced options.
  4. Click on Startup Settings.
  5. Click Restart.
  6. Now press the number that corresponds to Enable Safe Mode with Networking.

Once you’re booted up in Safe Mode, you can try making changes to the file. In all likelihood, you shouldn’t get the ‘File in Use’ error here and be able to edit or delete it as you wish.

The ‘File in Use’ error is a plain annoyance, especially considering the fact that even on Windows 11 we still don’t have an easy way to find which application is locking the files and folders in question. We hope with the use of this guide, you’re able to at least solve the problem and free your files/folders.

RELATED