


Fix: 'The action can't be completed because the folder or a file in it is open in another program'
Aug 06, 2025 am 01:03 AMThe issue occurs when a file in the folder is locked by another process; 2. To fix it, navigate away from the folder in File Explorer and disable the Preview and Details panes under the View tab; 3. If the problem persists, use Task Manager to identify and end processes that may be using the folder, then retry the action.
The error "The action can't be completed because the folder or a file in it is open in another program" usually appears in Windows when you're trying to delete, move, or rename a folder, but a file inside it is currently being used by another process. Even if you don’t see any programs using it, background processes or system functions might still have a lock on the file. Here’s how to fix it:

1. Close Programs That Might Be Using the Folder
First, check for obvious applications that could be accessing files in the folder:
- Microsoft Office apps (Word, Excel, etc.)
- Media players (if the folder contains audio/video files)
- File explorer previews or thumbnails
- Editors (like Notepad , Photoshop, etc.)
Close all open programs, especially those that might be previewing or editing files from that folder.

2. Check File Explorer Preview or Details Pane
Sometimes, just having the folder open in File Explorer can cause the issue:
- Open File Explorer and navigate away from the folder.
- Disable the Preview pane and Details pane (under the View tab).
- Try the action again after closing the window.
3. Use Task Manager to End Related Processes
If you suspect a background app is holding onto the folder:

- Press Ctrl Shift Esc to open Task Manager.
- Look under the Processes tab for any apps that might be using files (e.g., editors, cloud sync tools like OneDrive, Dropbox).
- Select suspicious processes and click End Task.
- Try deleting or moving the folder again.
4. Restart File Explorer
Windows Explorer itself might be locking the folder:
- In Task Manager, go to the Processes tab.
- Find Windows Explorer, right-click it, and choose Restart.
- Wait a few seconds for it to reload, then try your action again.
5. Use Resource Monitor to Find the Locking Process
This is the most reliable way to identify what’s using the file:
- Press Ctrl Shift Esc → go to Performance tab → click Open Resource Monitor at the bottom.
- Go to the CPU tab and scroll down to Associated Handles.
- In the search box, type the name of the folder or file.
- It will show which process is using it (e.g.,
explorer.exe
,OneDrive.exe
, etc.). - Right-click the process and select End Process (be cautious—don’t end critical system processes).
After ending the process, try your action again.
6. Reboot Your Computer
If you can’t identify or stop the process:
- Save your work and restart the computer.
- Immediately after reboot, don’t open any unnecessary programs.
- Try deleting or moving the folder right away.
This often works because no background apps have had a chance to lock the files yet.
7. Use Command Line (Optional)
If GUI methods fail, try using Command Prompt:
- Open Command Prompt as Administrator.
- Use
del
orrmdir
:rmdir /s "C:\path\to\folder"
Confirm and see if it removes the folder despite the lock.
8. Check for Malware or Sync Tools
Cloud storage apps like OneDrive, Google Drive, or Dropbox often sync in the background and lock files. Temporarily pause syncing or exit the app from the system tray.
Also, run a quick malware scan—some malicious software can lock files unexpectedly.
Basically, the key is identifying which process is holding a handle to the file. Resource Monitor is your best tool for this. If all else fails, a reboot usually clears the lock.
The above is the detailed content of Fix: 'The action can't be completed because the folder or a file in it is open in another program'. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undress AI Tool
Undress images for free

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

When the Windows Security Center is blank or the function is missing, you can follow the following steps to check: 1. Confirm whether the system version supports full functions, some functions of the Home Edition are limited, and the Professional Edition and above are more complete; 2. Restart the SecurityHealthService service to ensure that its startup type is set to automatic; 3. Check and uninstall third-party security software that may conflict; 4. Run the sfc/scannow and DISM commands to repair system files; 5. Try to reset or reinstall the Windows Security Center application, and contact Microsoft support if necessary.

Encountering something went wrong 657rx can be frustrating when you log in to Microsoft Teams or Outlook. In this article on MiniTool, we will explore how to fix the Outlook/Microsoft Teams error 657rx so you can get your workflow back on track.Quick

When encountering the "RPCserverisunavailable" problem, first confirm whether it is a local service exception or a network configuration problem. 1. Check and start the RPC service to ensure that its startup type is automatic. If it cannot be started, check the event log; 2. Check the network connection and firewall settings, test the firewall to turn off the firewall, check DNS resolution and network connectivity; 3. Run the sfc/scannow and DISM commands to repair the system files; 4. Check the group policy and domain controller status in the domain environment, and contact the IT department to assist in the processing. Gradually check it in sequence to locate and solve the problem.

When you encounter the "DefaultGatewayisNotAvailable" prompt, it means that the computer cannot connect to the router or does not obtain the network address correctly. 1. First, restart the router and computer, wait for the router to fully start before trying to connect; 2. Check whether the IP address is set to automatically obtain, enter the network attribute to ensure that "Automatically obtain IP address" and "Automatically obtain DNS server address" are selected; 3. Run ipconfig/release and ipconfig/renew through the command prompt to release and re-acquire the IP address, and execute the netsh command to reset the network components if necessary; 4. Check the wireless network card driver, update or reinstall the driver to ensure that it works normally.

When encountering the "SYSTEM_SERVICE_EXCEPTION" blue screen error, you do not need to reinstall the system or replace the hardware immediately. You can follow the following steps to check: 1. Update or roll back hardware drivers such as graphics cards, especially recently updated drivers; 2. Uninstall third-party antivirus software or system tools, and use WindowsDefender or well-known brand products to replace them; 3. Run sfc/scannow and DISM commands as administrator to repair system files; 4. Check memory problems, restore the default frequency and re-plug and unplug the memory stick, and use Windows memory diagnostic tools to detect. In most cases, the driver and software problems can be solved first.

Windows 11 KB5062660 is now rolling out as an optional update for Windows 11 24H2 with a few new features, including Recall AI in Europe. This patch is available via Windows Update, but Microsoft has also posted direct download l

When the boot prompt is "Windows could not start because of the following fileismissing" 1. You can run bootrec/fixmb, bootrec/fixboot, bootrec/rebuildbcd through the Windows installation media; 2. Check the hard disk connection or use CrystalDiskInfo to detect the health status of the hard disk; 3. If there is a dual system, you can use the bootrec command to rebuild the boot or manually add the boot items; 4. Use PE environment to kill viruses and combine DISM and SFC tools to repair the system files, and the system can be restored in most cases.

If the second monitor is not recognized by Windows, first check whether the cable and interface are normal, try to replace the HDMI, DP or VGA cable, confirm the plug-in video output port, and test different interfaces to eliminate compatibility issues; then verify the monitor power and input source settings, and connect the monitor separately to test whether it can be recognized; then enter the Windows display settings and click the "Detection" button, or use Win P to switch the display mode, and update the graphics card driver at the same time; finally check the graphics card specifications to confirm whether it supports multi-screen output to avoid exceeding its maximum output capability.
