Trying to delete a folder in Windows and getting the message “The action can’t be completed because the folder or a file in it is open in another program” can occur when an application, background process, File Explorer window, or system service still has a file or folder open.
In this guide, we’ll walk through several ways to fix the folder open in another program error in Windows 11 and Windows 10.
Can’t Delete Folder Because Computer Says It’s Open in Another Program

To delete a folder that Windows says is open in another program,
- Close all programs and File Explorer windows that may be using the folder.
- If the folder still cannot be deleted, restart Windows Explorer through Task Manager and try deleting it again.
- Next, restart your computer to release files and folders that may still be locked by a background process.
- If the problem continues, use Task Manager to close the application that may be accessing the folder.
- You can also use Command Prompt or Safe Mode when a persistent background process prevents the folder from being deleted.
The error usually means Windows has detected an active file handle connected to the folder or one of the files inside it. For example, a document in the folder might still be open in Microsoft Word, an image could be loaded by an editing program, or a background application could be scanning or synchronizing the folder.
Sometimes, the application that has the folder open is obvious. Other times, the process runs in the background, so there is no visible program window to close.
Windows protects files that are actively being used because deleting them while another process is accessing them could cause data corruption or unexpected behavior. Therefore, the goal is not simply to force the deletion.
The goal is to release whatever is using the folder and then delete it normally.
1: Close Programs That May Be Using the Folder
Start with the easiest solution by closing every program that might currently be using the folder or its contents. Look at the files inside the folder and think about which applications normally open those file types.
For example, if the folder contains a Word document, close Microsoft Word. If it contains a video, close your media player. If it contains images, close your photo editor. Also close applications such as archive utilities, development tools, cloud storage applications, or backup software if they may be accessing the folder.
After closing the suspected applications, wait a few seconds and try deleting the folder again. If Windows allows the deletion, the problem was caused by an application that still had a file open.
2: Close File Explorer Windows
File Explorer itself can sometimes keep a folder or one of its files active. This is particularly common when you have the folder open in another Explorer window.
Close every File Explorer window by selecting the X in the upper-right corner. Once all Explorer windows are closed, try deleting the folder again.
If you need File Explorer open to navigate to the folder, you can also use another window after closing the one that was displaying the affected folder. The important part is to make sure the problematic folder is not currently being accessed by an Explorer window.
3: Restart Windows Explorer
If closing File Explorer does not solve the issue, restarting the Windows Explorer process can release a temporary lock.
Press Ctrl + Shift + Esc to open Task Manager. If Task Manager opens in its simplified view, select More details. Under the Processes section, locate Windows Explorer.
Right-click Windows Explorer and select Restart. Your taskbar and desktop may disappear briefly while Windows Explorer reloads. This is normal, and you do not need to panic or restart the entire computer.
Once the desktop returns, navigate back to the folder and try deleting it. Restarting Windows Explorer is particularly useful when the problem is caused by a temporary Explorer process rather than another application.
4: Close the Suspected Application Through Task Manager
Sometimes an application appears to be closed but continues running in the background. Task Manager can help you shut down that process.
Press Ctrl + Shift + Esc and look through the running applications under Processes. Pay attention to programs that may have been working with the folder.
For example, if the folder contains files from a photo editor, video editor, compression utility, or development application, check whether that program is still running.
Select the suspected application and choose End task. Be careful when ending processes because some Windows processes are essential for normal operation. Only close applications you recognize and believe are connected to the folder.
After ending the suspected program, try deleting the folder again.
5: Pause Cloud Storage or Synchronization
A cloud synchronization service may temporarily use files inside the folder. Services that synchronize desktop folders, documents, photos, or other directories can keep files active while they are being uploaded or synchronized.
If the folder is inside a synchronized location, check whether the associated cloud application is currently working. Temporarily pause synchronization if the application provides that option.
Wait a moment, then try deleting the folder. If the folder disappears normally, the synchronization process was likely holding one or more files open.
You should also check whether the folder is currently being backed up, scanned, or synchronized before assuming Windows itself is causing the problem.
6: Restart Your Computer
If you still cannot delete the folder, restart your computer. This is one of the most effective solutions because restarting Windows closes active applications and releases many temporary file locks.
Select Start > Power > Restart and allow Windows to restart completely. Once you reach the desktop, do not immediately open the applications you were using before.
Instead, open File Explorer and go directly to the affected folder. Right-click it and select Delete.
If the folder deletes after the restart, a background application or temporary Windows process was probably keeping it open.
7: Delete the Folder Using Command Prompt
When File Explorer continues to refuse the deletion, Command Prompt provides another method.
Press the Windows key, type Command Prompt, right-click it, and select Run as administrator. You can then use the rmdir command to remove a directory.
For a folder that contains files and subfolders, the command generally follows this format:
rmdir /s /q “C:\Path\To\Folder”
Replace the example path with the actual location of your folder.
The /s option removes the specified directory along with its files and subfolders, while /q suppresses confirmation prompts. Because this command can permanently remove the selected folder and its contents, carefully verify the path before pressing Enter.
If another process still has a file locked, Command Prompt may also be unable to remove it. In that situation, continue to the next step.
8: Start Windows in Safe Mode
If a background application starts automatically and immediately locks the folder every time Windows loads, Safe Mode can help.
Safe Mode starts Windows with a limited set of drivers and services. This reduces the number of third-party programs that can interfere with the folder.
Go to Settings > System > Recovery > Advanced startup > Restart now. After Windows restarts, select Troubleshoot > Advanced options > Startup Settings > Restart. When the Startup Settings screen appears, choose the option for Safe Mode.
Once Windows starts in Safe Mode, locate the folder and try deleting it.
If the folder deletes successfully in Safe Mode, that strongly suggests a normal startup application or service was responsible. Afterward, restart Windows normally and investigate recently installed applications, synchronization tools, security software, or other programs that may be accessing the folder.
9: Check Whether a File Inside the Folder Is the Problem
Sometimes Windows reports that the folder is open when the actual problem is a single file inside it.
Open the folder and look at its contents if Windows allows you to do so. Pay attention to files that are currently open in another application, especially documents, videos, archives, database files, or files being edited by specialized software.
Close the application associated with the file and then attempt to delete the folder.
You should also make sure you are not previewing the file in File Explorer. Closing File Explorer or switching away from the folder can help release temporary access.
10: Try Deleting the Folder Again
After completing the troubleshooting steps, return to the folder and try the normal deletion process.
Right-click the folder, select Delete, and then empty the Recycle Bin if you no longer need the folder.
If Windows deletes it successfully, the issue has been resolved. If the same message continues appearing, avoid repeatedly forcing the deletion. A persistent lock usually means that a specific process is still accessing the folder, and identifying that process is the next logical step.
Faqs
Why does Windows say a folder is open when I cannot see it open?
A background process may be using the folder or one of its files. Cloud synchronization, antivirus scanning, indexing, media applications, and other background services can sometimes access files without displaying an obvious window.
Will restarting my computer delete the folder?
No. Restarting Windows does not automatically delete the folder. It simply closes applications and releases many temporary locks, allowing you to try deleting the folder again.
Can I delete the folder from Command Prompt?
Yes. You can use the rmdir command to remove a folder, including its contents. However, make sure you enter the correct folder path because the command can remove files without moving them to the Recycle Bin.
What if the folder still cannot be deleted after restarting?
If restarting does not help, check Task Manager for applications that may be accessing the folder. You can also try Safe Mode to determine whether a third-party application or service is responsible.
Is it safe to end a process in Task Manager?
It can be safe when you end a recognizable application that you know is using the folder. Avoid ending unfamiliar Windows system processes, because doing so can cause instability or force Windows to restart certain components.
Can antivirus software prevent a folder from being deleted?
Yes. Security software may temporarily access files while scanning them. If the folder contains recently downloaded or modified files, wait for the scan to finish and then try deleting the folder again.