How to fix this action cannot be completed because the file is open?

This error message can be frustrating when you are trying to make changes to a file but can’t because it is currently open. However, there are usually some simple solutions to resolve the issue. In this article, we will go over the main causes of this error and the steps you can take to fix “This action cannot be completed because the file is open” on Windows 10.

What Causes This Error Message?

There are a few common reasons why you may get the “This action cannot be completed because the file is open” error message in Windows 10:

  • The file you are trying to modify is currently open in another program. For example, if you try to delete an Excel file while it’s open in Excel, you’ll get this error.
  • The file is being used or indexed by another process. For example, if a downloaded installer file is still being used by the browser.
  • The file is open over a network share. Trying to modify a file opened from a network location can sometimes trigger this error.
  • Antivirus or backup software has locked the file. Some security software will lock files while scanning them.
  • The file is corrupted or damaged. A corrupted file may be “locked” and trigger this error when trying to modify it.

So in summary, the file being in use, locked, or corrupted is what typically causes this error. To resolve it, you need to close the file or release it from whatever process is using it.

How to Fix “This Action Cannot Be Completed Because the File Is Open”

Here are the steps to try to fix the “This action cannot be completed because the file is open” error in Windows 10:

1. Close Any Programs Using the File

First, check if the file is open in any other programs on your computer and close it. For example, if you’re trying to modify a document but it’s open in Microsoft Word, close Word first. This releases the file and allows changes to be made to it.

2. Use Task Manager to End Processes Using the File

Sometimes a program may lock a file without visibly opening it. In this case, use Task Manager to find any processes using the file and end them:

  1. Press Ctrl + Shift + Esc to open Task Manager.
  2. Go to the “Details” tab.
  3. Right-click on the column headers and enable the “Command line” column.
  4. Scroll through the list of processes and look for the file name.
  5. Select any processes using that file and click “End task”.

Ending these processes should release the file they were using.

3. Unlock the File Using Unlocker

For files locked by Windows for an unknown reason, you can use a free tool called Unlocker. This will find and release locked files.

  1. Download and install Unlocker.
  2. Right-click on the locked file and select “Unlocker” from the context menu.
  3. Follow the on-screen prompts to unlock the file.

4. Disable or Exit Any Antivirus Software

Antivirus tools will sometimes lock files while scanning them. Temporarily disabling your antivirus or exiting any antivirus utilities may allow the file operation to complete.

Remember to re-enable your antivirus once you’re done making file changes.

5. Copy the File Locally

If the file is on a network share, copy it to a local folder on your PC first, then try to modify the local version. Network locking issues can sometimes cause this error.

6. Reboot Your Computer

Rebooting your computer will end all processes and clear any locks. Once restarted, try modifying the file again before opening other programs.

7. Repair Corrupted System Files

If the file itself is corrupted, use the System File Checker tool to scan Windows files and repair any damage:

  1. Open an elevated Command Prompt (click Start, type cmd, right-click Command Prompt and select “Run as administrator”).
  2. Type “sfc /scannow” and hit Enter.
  3. This will check Windows system files and replace any that are corrupted.

How to Avoid This Error in The Future

To avoid getting the “This action cannot be completed because the file is open” error going forward, follow these tips:

  • Make sure to close files before accessing them from other programs or trying to modify them.
  • Allow sufficient time for downloads to complete before trying to open installer files.
  • Use the “Safely Remove Hardware” option before disconnecting external drives.
  • Avoid accessing files on network shares if possible.
  • Add exclusions for folders you frequently edit in antivirus and backup tools.
  • Regularly scan your system for corrupted files and malware.


The “This action cannot be completed because the file is open” error occurs when a file is in use by another process or program. To resolve it, close any programs using the file, end associated processes, unlock the file with Unlocker, disable antivirus software, copy network files locally, reboot your PC, or use the System File Checker to repair system file damage. Following the troubleshooting steps outlined in this article should help you get rid of this pesky error and modify your files again.

Cause Solution
File open in another program Close the program using the file
Process locking the file End process in Task Manager
File locked by Windows Use Unlocker tool
Antivirus software locking file Disable/exit antivirus software
Network file locking issues Copy file locally first
Corrupted system files Run System File Checker scan

Following the troubleshooting steps outlined in this article should help you get rid of the “This action cannot be completed because the file is open” error. Some key points to remember include:

  • Close any programs that may be using the file before trying to modify it.
  • Use Task Manager to end processes associated with locked files.
  • Tools like Unlocker can help release Windows file locks.
  • Temporarily disabling antivirus software may resolve file locking issues.
  • Copy network files locally before editing to avoid network file locks.
  • Reboot your PC or run the System File Checker to repair file corruption issues.

Following proper file management practices like closing files when done and allowing downloads to finish before opening files can also help avoid this issue. Overall, a bit of troubleshooting to identify what is locking the file combined with the solutions outlined here should resolve the “This action cannot be completed because the file is open” error in most cases.

Frequently Asked Questions

Why do I keep getting the “file is open” error in Windows 10?

This error commonly occurs because the file you are trying to modify is currently open in another program, locked by an application or Windows, in use over the network, or corrupted. Antivirus software scanning a file can also sometimes trigger this error.

How do I know what program has my file open?

You can use Task Manager to view running processes and see if any have the file open. Enable the “Command line” column, look for the file name, and identify the associated program. Programs like Unlocker can also detect what’s locking a file.

What files are usually open causing this issue?

Common file types that trigger this include documents open in Office apps, downloads still being used by a browser, media files opened in editing programs, executable program installers, and Outlook data files (.ost and .pst).

What should I do if closing programs doesn’t fix the file open error?

Other steps to try include using Task Manager or Unlocker to end processes associated with the file, disabling antivirus software, copying network files locally first, rebooting your PC, or using the System File Checker tool to repair system file corruption.

How can I permanently get rid of this error?

Always close files when you are finished with them, allow sufficient download time before opening installers, use the “Safely Remove Hardware” option before disconnecting drives, avoid accessing files on network shares, and regularly scan for malware and corrupted system files.

Tips to Avoid the “File Is Open” Error

Here are some additional tips to help avoid seeing the “This action cannot be completed because the file is open” error when working with files in Windows 10:

  • Close programs properly – Use the Close command instead of simply clicking X on the window or pressing Alt + F4 which may not fully release the file.
  • Wait for downloads to finish – Give it time before trying to open an installer or media file that is downloading.
  • Copy files locally before editing – If a file is on a network share, copy it to your desktop first.
  • Unlock files before editing – Use Unlocker or Handle to ensure files aren’t locked before opening them.
  • Exclude folders from antivirus scans – Add folders containing often-edited files to the antivirus exclusion list.
  • Avoid opening the same file in multiple programs – Opening a file in two programs can sometimes lock it.
  • Check for app crashes – An app crashing with a file open could leave it locked; reboot to clear locks.
  • Turn off auto-save features – Auto-save can re-lock a file if you forgot to close it properly.
  • Use separate user accounts – Issues with locking may be user profile specific, so try a different Windows user.
  • Disable indexing on key folders – Turn off Windows indexing on folders containing frequently accessed files.

Paying attention to properly closing files, allowing time for tasks to complete, and configuring apps to reduce locking situations can help prevent this problem.

When to Seek Additional Help

With the troubleshooting steps provided in this guide, you should be able to resolve most cases of the “This action cannot be completed because the file is open” error on your own. However, if you continue to experience the issue, it may require further assistance to address:

  • The file may be damaged and need repaired – Use scanning tools to check for file corruption.
  • Outdated drivers could be causing conflicts – Update all your device drivers.
  • Registry errors may prevent file operations – Try running a registry cleaner.
  • Malware could be involved – Scan for viruses and malware.
  • A system utility or tool may be the culprit – Uninstall recently added programs.
  • There may be an issue with non-Microsoft security software – Try uninstalling third-party antivirus apps.
  • You have exhausted all typical troubleshooting steps – An advanced user or tech support may be needed.

If the solutions here do not successfully resolve the problem, it’s best to contact a technical support resource for additional troubleshooting help.


Dealing with the “This action cannot be completed because the file is open” message can certainly be annoying. However, understanding what causes the issue and following the step-by-step troubleshooting guide outlined here should allow you to resolve it in most cases. Be sure to close any programs using the file, check for locks, disable antivirus software, copy local files, and reboot your system to clear any locks. Employing preventive strategies can also help avoid this issue and ensure file operations go smoothly. If the solutions here do not fix the problem, seek additional technical support to troubleshoot potential underlying causes.