Few things are more frustrating than trying to delete, move, rename, or modify a file in Windows and seeing the message “The action can’t be completed because the file is open in another program.” Even when you cannot see any application using the file, Windows may still detect an active process that is locking it.
This issue is common in both Windows 11 and Windows 10 and can occur with documents, videos, PDFs, folders, ZIP files, and even system files. In many cases, a background application, the File Explorer process, the antivirus program, or the synchronization service is keeping the file open.
Let’s go for its solutions!
Fix This Action Cannot Be Completed as the File Is Open in Windows

To fix “This action cannot be completed because the file is open in another program” in Windows:
- Close the program currently using the file.
- Restart File Explorer from Task Manager.
- Use Task Manager to end background applications.
- Pause cloud syncing services such as OneDrive.
- Find the locking process using Resource Monitor.
- Restart your computer to release file locks.
- Use Safe Mode if the file remains locked.
- Perform a clean boot to identify conflicting software.
These methods help release the file lock so you can delete, rename, move, or edit the file successfully.
1: Close the Program Using the File
Open all applications that may be related to the file and make sure they are fully closed.
The most common reason for this error is that the file is currently being used by another program. For example, if you are trying to delete a Word document, Microsoft Word may still have it open in the background. Similarly, a PDF reader, image editor, media player, or browser tab may be actively accessing the file.
Carefully check your open applications and close any program that may have used the file recently. After closing the application, wait a few seconds and try the action again.
Many beginners make the mistake of minimizing an application instead of closing it. Make sure the program is completely exited rather than simply hidden on the taskbar.
If the file still shows as open, move on to the next step.
2: Restart Windows File Explorer
Restart the File Explorer process from Task Manager to clear temporary file locks.
Sometimes the file is not being used by a traditional application at all. Instead, Windows File Explorer itself may be holding onto the file. This commonly happens after previewing files, opening folders repeatedly, or using the search function.
Press Ctrl + Shift + Esc to open Task Manager. In the Processes tab, locate Windows Explorer. Select it and click Restart.
Your desktop icons and taskbar may briefly disappear and then return. This is normal.
Once File Explorer restarts, navigate back to the file and try deleting, moving, or renaming it again. In many cases, restarting Explorer immediately resolves the issue.
3: End Background Applications in Task Manager
Look for hidden applications that may still be using the file.
Even when a program appears closed, background processes may continue running. These hidden processes can maintain a lock on the file and prevent changes.
Open Task Manager and review the active processes. Look for applications that could be connected to the file, such as media players, editing software, archive utilities, backup tools, or PDF readers.
Select the process and choose End Task. After ending the process, return to the file and test whether the error is gone.
Be careful not to end critical Windows processes unless you know exactly what they do. Focus only on third-party applications that are likely connected to the file.
4: Pause OneDrive and Other Sync Services
Temporarily stop cloud synchronization services that may be accessing the file.
Cloud storage platforms such as OneDrive, Google Drive, and Dropbox constantly monitor files for changes. While syncing, these services can temporarily lock files and prevent modifications.
Locate the cloud storage icon in the system tray near the clock. Open the service and select the option to pause syncing.
After syncing is paused, try acting again. If the file works normally, the sync service was likely responsible for the lock.
Once the issue is resolved, you can safely resume synchronization.
5: Find the Locking Process with Resource Monitor
Use Resource Monitor to discover exactly which process is locking the file.
When the source of the problem is unclear, Resource Monitor can help identify the process responsible for the lock.
Press Windows + R, type resmon, and press Enter. Open the CPU tab and locate the Associated Handles search box.
Type part of the file name and wait for the results to appear. Windows will display processes currently accessing that file.
Once you identify the process, return to Task Manager and close it if appropriate. After the process is stopped, the file should become available.
6: Restart Your Computer
Reboot Windows to clear locked files and temporary processes.
A restart is one of the simplest and most reliable solutions available. Windows closes active processes and releases file handles during the shutdown process.
Save your work, restart the computer, and immediately try the file operation after signing back in.
Many file lock issues disappear after a reboot because temporary system conflicts are removed automatically.
7: Start Windows in Safe Mode
Use Safe Mode to act with minimal background services running.
If a file remains locked even after restarting, a startup application or service may be causing the issue.
Open the Windows Recovery environment and boot into Safe Mode. In this mode, Windows loads only essential drivers and services.
After entering Safe Mode, locate the file and attempt the action again. Since most third party programs are disabled, the file is often no longer locked.
If the file can be modified in Safe Mode, the issue is likely caused by software that loads during normal startup.
8: Perform a Clean Boot
Disable non-Microsoft services to identify software conflicts.
A Clean Boot starts Windows with only essential Microsoft services enabled. This helps determine whether background software is causing the lock.
Press Windows + R, type msconfig, and press Enter. Open the Services tab and check Hide all Microsoft services. Then click Disable All.
Next, open the Startup section in Task Manager and disable unnecessary startup items.
Restart your computer and test the file again.
If the file works correctly after the clean boot, re-enable services gradually until you identify the application causing the problem.
9: Use Command Prompt to Remove the File
Attempt the operation through Command Prompt when File Explorer cannot complete it.
Occasionally, File Explorer encounters difficulties even though the file is technically available.
Open Command Prompt as Administrator and navigate to the file location. Use the appropriate command to remove or rename the file.
The command line often bypasses minor File Explorer issues and can complete actions that fail through the graphical interface.
Note: Be careful when using administrative commands and verify that you are working with the correct file before proceeding.
FAQs
Why does Windows say a file is open when it is not?
The file is usually being accessed by a background process, synchronization service, antivirus program, or File Explorer itself. Even if no visible application is open, Windows may still detect an active file handle.
How do I find out what program is using a file?
You can use Resource Monitor and search for the file under Associated Handles. This will show the process currently accessing the file.
Will restarting my PC unlock the file?
Yes. Restarting closes active processes and releases file locks, making it one of the easiest and most effective solutions.
Can antivirus software cause this error?
Yes. Some antivirus applications scan files in real time and may temporarily lock them while performing security checks.
Is it safe to end tasks in Task Manager?
It is generally safe to end non-essential third-party applications. Avoid terminating important Windows system processes unless you understand their purpose.