How to Solve “File Is Open in Another Program” Error in Windows

How To Solve File Is Open In Another Program Error In Windows Featured

While using Windows, you may have tried to delete a file or move it to another location and encountered an error that states, “Action cannot be completed because the file is open in another program,” even though you have not opened the file in any program. There are a number of reasons this error may arise. This guide includes several fixes that may help address this problem.

Good to know: want your files to be deleted for good? Check out the best tools to securely delete your files!

1. Check Whether the File Is Open on Another Computer

If your computer is connected to a local network – either at home or in the office – then it’s possible that the file you’re looking to close is open elsewhere on the network (possibly even by accident!).

If you suspect that the file may be open on another computer on the network, you don’t have to go through the awkwardness of asking around the office or messing around blindly on other computers.

  1. Click Start and search for “computer management,” then click the best match.
Typing "Computer Management" in Search.
  1. In the new window on the left, click “System Tools -> Shared Folders -> Open Files.”
Clicking on "Disconnect All Open Files" option in Computer Management.
  1. This will show any shared files that are open on your network. You can right-click the file, then close it. Alternatively, click an empty space, and select “Disconnect All Open Files” from the menu that appears.

2. Locate the File in Task Manager

If the file’s open in a specific program, you may be able to use Task Manager to solve the “File is open in another program” error.

  1. Use the shortcut Ctrl + Shift + Esc to open Task Manager.
  2. Click the “Processes” tab if it’s not already open. This lists everything that’s currently running on your PC. Depending on which version of Windows you’re running, the tabs may be on the left sidebar instead of on top.
Task Manager view in "Processes" tab.
  1. Select the file (or the program commonly associated with it), and click on the “End Task” option near the bottom of the Manager window to stop the file from being used by a program.
  1. Go back to the file, and try to delete it again. If it still doesn’t work, move on to the next step.

Tip: can’t access Task Manager because it was disabled by your system’s administrator? Learn how to reverse the situation.

3. Restart File Explorer through Task Manager

Instead of ending the task, this solution tries to restart the process.

  1. Once again, open Task Manager, and go to the “Processes” tab.
  2. Scroll all the way down until you find the Windows Explorer process. Right-click it, then click “End task.”
Closing Windows Explorer via Task Manager.
  1. Go to “File” at the top of the Task Manager window, and select “Run new task.”
Executing "Run new task" from Task Manager File menu.
  1. If you don’t have a “File” menu, look for “Run new task” above the list of processes on the right side of the screen.
Clicking on "Run new task" button in Task Manager.
  1. In the new window that opens, type “explorer.exe” and hit Enter.
Typing"explorer.exe" in new task window.
  1. This process will restart Windows Explorer to clear up any problems with its memory or cached files that may have been causing the issue.
  2. Once again, go to the file, and try to delete it. If it still doesn’t work, move on to the next step.

4. Turn Off the Caching of Thumbnails in Hidden thumbs.db Files

Microsoft has admitted in the past that the thumbnail cache relating to files and folders can cause the “File is open in another program” error, so tackling this aspect can help resolve the error.

Note: the following process requires you to have the Professional edition of Windows. Group Policy Editor isn’t available in the Home version. If you have the Home version, skip to the alternative method directly below this one.

  1. Press Win + R to bring up the Run window.
  2. Type gpedit.msc, then hit Enter.
Typing "gpedit.msc" in Run window.
  1. In the new window that pops up, go to “User Configuration -> Administrative Templates -> Windows Components -> File Explorer.”
Accessing path in Local Group Policy Editor.
  1. Go to the right pane, and double-click on the “Turn off the caching of thumbnails in hidden thumbs.db files” option.
Double-clicking the "Turn off the caching of thumbnails in hidden thumbs.db files" option in Local Group Policy.
  1. Select the button next to “Enabled,” then “Apply -> OK.”
  2. All the thumbnails in File Explorer will now be disabled, allowing you to carry out the desired action on the file. You can re-enable the thumbnails by following the above steps and changing the policy back to “Not Configured.”

FYI: learn how to reset Group Policy Settings in Windows.

Delete Thumbnails and Stop Caching in Windows Home

  1. Open your Start menu, and search for “command prompt.” Click “Run as administrator” under the result.
Running Command Prompt as administrator from Windows Search.
  1. Ensure that you’re using the same drive Windows is installed on. Typically, this is the “C” drive. If not, just type “cd drive letter:” and press Enter.
  2. Enter the following command, and press Enter again:
del /ash /s thumbs.db
  1. Wait until the files are deleted before proceeding.
  2. Exit the Command Prompt window.
  3. Open File Explorer, and select “My PC.” The following steps will stop your PC from creating thumbnails.
  4. In Windows 11, click the three dots beside “View,” and select “Options.” In Windows 10, select “View” from the menu at the top, then “Options.”
Clicking "Options" in File Explorer.
  1. Click the “View” tab, and check “Always show icons, never thumbnails.” Press “Apply” to save your changes.
Checking "Always show icons, and never thumbnails" in Folder Options window.

Good to know: use these tools to help you keep the amount of temporary files in your system in check.

5. Delete Temporary Files

Temporary files are stored on your computer every time you modify a file in any manner. These temporary files may be preventing you from moving or deleting the related files, which may lead to a “This action can’t be completed, as file is open” message. Follow these steps to remove them from your computer storage.

  1. Press Win + R to bring up the Run window.
  2. Type %temp% into the input bar, and press Enter.
Typing "%temp%" in Run window.
  1. In the new folder that opens containing all the temporary files stored in your File Explorer, press Ctrl + A to select all the files, and delete them together.
Deleting temp files in bulk via File Explorer.
  1. There may still be temporary files stored in another location. Again, press Win + R, then type “temp” followed by Enter.
Typing "temp" in Run window.
  1. Once again, select all the temporary files in the folder that opens, and delete them all.

6. Check the Folder for Viruses

If none of the above methods work, the problem may be more serious. There may be a virus associated with the file that is preventing you from making changes to the file. Run the file through your antivirus software to locate any virus or malware it might contain.

If this does turn out to be the case, isolate the file using your antivirus software, and delete it before it can infect other files.

Tip: check out how you can restore deleted and lost files on your Windows PC.

7. Empty Your Recycle Bin

Whether you’re getting a “File is open in another program” or “This action can’t be completed as file is open” error, your Recycle Bin could be to blame. If you’re the kind of person who never empties the little trash can on your desktop, it could be overflowing with deleted files. File Explorer hates it when your Recycle Bin is too full, so empty it to see whether that solves your problem.

  1. Right-click on your Recycle Bin.
  2. Select “Empty Recycle Bin.”
Clicking on "Empty Recycle Bin" option in Windows.
  1. It may take up to a minute to fully delete everything. Once you don’t see any crumpled paper in the bin, it’s done.
  2. Try opening or interacting with your file again.

8. Check for Hard Disk Problems

If your hard drive is starting to fail, you may run into “File is open in another program” errors. There are multiple tools, including a few built-in Windows tools, that will check your hard drive’s health. Run a scan with one or more of these tools to see if there’s a problem. If you find that to be the case, back up all your files immediately to prevent losing anything.

9. Stop All Background Processes

Even if you don’t open a program, it may automatically start with Windows or alongside another program. Since it’s running in the background, you won’t even realize it’s open. One of these background processes could be associated with your file, even after you’ve closed it.

Instead of trying to figure out the culprit, let the Resource Monitor do it for you.

  1. Open the Run window, type resmon.exe, and click “OK.”
Typing "resmon.exe" in Run window.
  1. Open the “CPU” tab in the Resource Monitor, and expand “Associated Handles” at the bottom.
Expanding "Associated Handles" option in Resource Monitor under "CPU" tab.
  1. In the “Search Handles” box, type the name of your file or folder. You’ll see a list of every process associated with the term. If nothing appears, then it’s not a background process issue.
Searching for file or folder in Resource Monitor app.
  1. Right-click any process you want to stop, and select “End Process.”
Ending a process in Resource Monitor.

Tip: if your screen saver functionality is not functioning properly, we have a list of fixes for you to try on your Windows PC.

10. This Action Cannot Be Completed Because the File Is Open In …

If your error message includes a specific program name, there are several options to try:

  • Close the program, and restart your PC. This helps if the file is just hung up in the program.
  • If you still can’t edit, open, or delete the file, try booting into Safe Mode. This stops many background processes and other issues that may be interfering. Try deleting the file while in Safe Mode, and restart your PC.
  • Check to see whether any duplicate files have been created. This mostly happens if your file is open in your browser. Duplicate files have (1), (2), etc., beside the file name.

Tip: learn how to transfer user profile data to another quickly and efficiently in Windows.

Frequently Asked Questions

How do I find which process is locking my file in Task Manager?

While Resource Monitor can help with this, it doesn’t always find the process. If it doesn’t work for you, try Microsoft’s File Locksmith Utility. It’s one of the infamous PowerToys and free to use. You just need to activate it.

How do I force delete a file, even if it’s open?

If you just want to delete a file, but keep getting errors about it being open, there is a workaround. Locked files take a little extra work to delete. Even so, you can try these steps to force delete an undeletable file.

How do I delete open files in Chrome?

If you often open files in Chrome, you may notice “File open in another program” errors when trying to modify files. To fix this, you’ll need to close Chrome and restart your PC. Then, open Chrome again, and press Ctrl + Tab. This will show you whether your file or a copy of it is open in another tab.

Look for copies of your file on your PC. You can use the Windows search feature or a third-party tool like Everything for this. Delete any copies, restart your PC, and you should have control over the original file again.

All images by Crystal Crowder.

Is this post useful?
Subscribe to our newsletter!

Our latest tutorials delivered straight to your inbox

Crystal Crowder
Crystal Crowder - Staff Writer

Crystal Crowder has spent over 15 years working in the tech industry, first as an IT technician and then as a writer. She works to help teach others how to get the most from their devices, systems, and apps. She stays on top of the latest trends and is always finding solutions to common tech problems.