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
- 2. Locate the File in Task Manager
- 3. Restart File Explorer through Task Manager
- 4. Turn Off the Caching of Thumbnails in Hidden thumbs.db Files
- 5. Delete Temporary Files
- 6. Check the Folder for Viruses
- 7. Empty Your Recycle Bin
- 8. Check for Hard Disk Problems
- 9. Stop All Background Processes
- 10. This Action Cannot Be Completed Because the File Is Open In ...
- Frequently Asked Questions
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.
- Click Start and search for “computer management,” then click the best match.
- In the new window on the left, click “System Tools -> Shared Folders -> Open Files.”
- 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.
- Use the shortcut Ctrl + Shift + Esc to open Task Manager.
- 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.
- 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.
- 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.
- Once again, open Task Manager, and go to the “Processes” tab.
- Scroll all the way down until you find the Windows Explorer process. Right-click it, then click “End task.”
- Go to “File” at the top of the Task Manager window, and select “Run new task.”
- 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.
- In the new window that opens, type “explorer.exe” and hit Enter.
- This process will restart Windows Explorer to clear up any problems with its memory or cached files that may have been causing the issue.
- 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.
- Press Win + R to bring up the Run window.
- Type
gpedit.msc
, then hit Enter.
- In the new window that pops up, go to “User Configuration -> Administrative Templates -> Windows Components -> File Explorer.”
- Go to the right pane, and double-click on the “Turn off the caching of thumbnails in hidden thumbs.db files” option.
- Select the button next to “Enabled,” then “Apply -> OK.”
- 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
- Open your Start menu, and search for “command prompt.” Click “Run as administrator” under the result.
- 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.
- Enter the following command, and press Enter again:
del /ash /s thumbs.db
- Wait until the files are deleted before proceeding.
- Exit the Command Prompt window.
- Open File Explorer, and select “My PC.” The following steps will stop your PC from creating thumbnails.
- 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.”
- Click the “View” tab, and check “Always show icons, never thumbnails.” Press “Apply” to save your changes.
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.
- Press Win + R to bring up the Run window.
- Type
%temp%
into the input bar, and press Enter.
- 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.
- There may still be temporary files stored in another location. Again, press Win + R, then type “temp” followed by Enter.
- 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.
- Right-click on your Recycle Bin.
- Select “Empty Recycle Bin.”
- 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.
- 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.
- Open the Run window, type
resmon.exe
, and click “OK.”
- Open the “CPU” tab in the Resource Monitor, and expand “Associated Handles” at the bottom.
- 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.
- Right-click any process you want to stop, and select “End Process.”
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.
Our latest tutorials delivered straight to your inbox