
Have you faced the frustrating scenario of trying to delete or relocate a file only to be greeted by the irritating message: “Action cannot be completed because the file is open in another program”? This situation is more routine than many users realize. Fortunately, there are numerous solutions you can employ to resolve these file open errors quickly and efficiently.
Quick Fixes
Before diving deep into more complex troubleshooting methods, try out these rapid solutions which can often remedy the issue:
- Restart Your Computer: Restarting helps close apps or processes that may be using the file unknowingly.
- Check Antivirus Programs: Ensure that your antivirus software isn’t currently scanning the file or folder, as this can often lock files.
- Disconnect from the Internet: Cloud sync services like OneDrive or Google Drive can lock files while syncing. Disconnect to stop this process.
1. Confirm if Another PC is Using the File
If your device is connected to a local network, another user (perhaps even unknowingly) might be accessing the file. To confirm its status, follow these steps:
Start by opening the Start menu and typing Computer Management. Select the corresponding result.
Navigate through the left pane by selecting System Tools -> Shared Folders -> Open Files.

If you detect the troublesome file, right-click on it and choose Close. Alternatively, right-click an empty space and select Disconnect All Open Files to close any file that other computers might still be using.
2. Use Task Manager to Identify the Program
If the error persists, look for the file in Task Manager as it may be tied to a specific program running in the background.
Press Win + X and select Task Manager. Click on the Processes tab to view running applications.
Select the problematic program or file and click on End Task, or right-click the specific application and select End Task.

Once completed, try deleting the file again. If it doesn’t work, don’t worry—there are still more solutions to examine.
3. Restart File Explorer
Restarting File Explorer can help clean up any lingering file locks without risking data loss. Ensure that all your active files are saved beforehand.
Again, access Task Manager by pressing Win + X. Go to the Processes tab. Search for Windows Explorer, right-click on it, and choose Restart.
Should nothing change, rebooting your computer should restart Windows Explorer as well.
4. Disable Thumbnail Caching
Thumbnail caching is known to cause “File is open in another program” errors. To address this, follow these steps:
Open the Run window using Win + R. Type gpedit.msc
and press Enter. If you don’t have Group Policy Editor, refer to alternative methods to manage thumbnail cache.
In the left pane, navigate to User Configuration -> Administrative Templates -> Windows Components -> File Explorer.

Locate the Turn off the caching of thumbnails in hidden thumbs.db files option in the right pane and double-click it.

Set it to Enabled, then click Apply and OK to enact your changes. Disabling thumbnails within File Explorer will allow you to perform your intended action on the locked file. You can revert the settings later if desired.
For users without access to Group Policy Editor, deleting thumbnail files can be done via the command prompt.
Delete Thumbnails via Command Line
1. Open the Start menu, type in cmd, and select Run as administrator.
2. Ensure you’re operating on the same drive where Windows is installed, usually the “C” drive. Otherwise, enter cd [Your Drive Letter] and hit Enter.
3. Execute the following command:
del /ash /s thumbs.db
4. Wait until the command finishes, then type exit to leave Command Prompt.
5. Navigate to This PC in File Explorer. Click the three dots beside View and select Options.

6. Within the View tab, select Always show icons, never thumbnails and click Apply.

5. Clear Out Temporary Files
Temporary files often accumulate and may interfere with file operations, causing related error messages. It’s beneficial to regularly delete these files from your system.
To delete temporary files:
Press Win + R, type in %temp%
, and hit Enter.
In the Temp folder that opens, press Ctrl + A to select everything and delete them simultaneously.

6. Scan for Viruses
If you’ve exhausted the above methods, it may be time to suspect potential malware. Viruses can hijack files and restrict changes. Ensure to run a full system scan with your antivirus software to check for threats.
If a virus is detected, isolate and delete any affected files to safeguard your system from infections.
7. Empty Your Recycle Bin
Believing your Recycle Bin may be contributing to the issue? A cluttered Recycle Bin can sometimes contribute to these errors. Simply right-click on the Recycle Bin icon and select Empty Recycle Bin.

After a brief wait, during which the deletion process completes, attempt to access your file again.
8. Inspect for Hard Disk Issues
File access errors might stem from hard disk problems. Use built-in Windows utilities or third-party tools to assess the health of your hard drive. If issues are detected, prioritize backing up essential data immediately.
9. Halt Background Processes with Resource Monitor
Sometimes programs start automatically with Windows or alongside others, leading to a file being locked in the background. To identify and end these processes, utilize the Resource Monitor.
Launch the Run window, type resmon.exe
, and click OK.
Within the CPU tab, expand the section marked Associated Handles.

Utilize the Search Handles box to enter the name of the file or folder. You’ll see all processes tied to it. Right-click on any relevant process and select End Process.

10. Use File Locksmith in PowerToys
PowerToys, a suite of tools from Microsoft not included by default, packs a host of useful utilities, including File Locksmith that can assist you in regaining control over locked files.
Download and install PowerToys, if you haven’t done so already. Access settings by right-clicking the PowerToys icon in your notification area.
Ensure that File Locksmith is enabled. If it is off, toggle it to the on position.

Once enabled, right-click the troublesome file and select Unlock with File Locksmith. If this option is absent, a restart might be necessary.

Review the list of applications or services utilizing the file. Right-click any unwanted tasks and select End Task. You can refresh the tasks with the Reload button at the top right to ensure updated information.
11. Address Program-Specific File Open Errors
If the error message specifies a particular program, consider trying these approaches:
- Close the program generating the error and restart your computer to free up any hung processes.
- Boot into Safe Mode to eliminate interference from background processes. Attempt to delete or modify the file while in Safe Mode.
- Look for duplicate files that might have opened inadvertently, especially if accessed through a web browser; these often carry names like (1), (2), etc., suffixes.
12. Copy and Delete Method
If all else fails, you may still bypass the issue by copying the file instead of cutting it. Even if the original file is locked, copying it to a new location may succeed. Once the copy is created, attempt to delete the original file, which might require forced deletion due to locking.
Frequently Asked Questions
1. What does the “file is open in another program”error mean?
This error typically indicates that the file you are trying to access or modify is currently being used by another application, preventing you from making any changes until it is closed.
2. How can I tell which program is using the file?
You can identify which program is using the file by using the Task Manager or Resource Monitor. Look for the file name in these tools to see which application is locking it.
3. Will restarting my computer always fix this issue?
Restarting your PC can often resolve file locking issues as it closes all applications and processes. However, if the error persists, further troubleshooting is necessary.
Leave a Reply ▼