The action cannot be completed because the folder or file is open in another program: How to determine where a file is open in windows

You may be prompted with the following error below when you attempt to delete a folder in Windows 10 or Windows Server. I ran into this issue when I wanted to delete some residues left from the Windows File System (unmounted Windows 10 image (install.wim) file).

The “File Is Open in Another Program” error can be frustrating to solve. Fortunately, there are a number of ways to tackle this issue.

Here are some possible other errors you can encounter relating to WDS. Error 0xc1570103: The license file was not found in the specified path, how to fix error 0xc1510114: The wim file needs to be remounted, ensure the image is mounted. Also see this article on how to mount an image, and how to remove packages from the Windows image.

There is not a single fix for this issue as shown below. Please follow the steps described below to resolve this issue.
– Note: This error is not a permission issue, and as such do not consider checking that.

In order to resolve this issue before employing the hard way to reboot your server which can possibly fix this issue. This is also not recommended because, if the server is a production server, you cannot just reboot it as it is critical system and must not be interrupted.

Here are a couple of ways I would follow to resolve this issue
Step 1: Open the program path via Windows 10 Task-Manager: This step is relatively straight forward.
– Open the Task Manager by right-clicking on your Windows Taskbar or use the keyboard-shortcut [CTRL+ Shift + Esc] to start the Windows 10 Task Manager.
– In the Task-Manager click More details and
– Select the Tab “Processes”.
As we can see below, there is currently no process using the files.

Step 2: Sing the “Resource Monitor”: You can use the Resource Monitor which is an inbuilt tool for Windows devices to find which handle or DLL is using it.

Open Resource Monitor, There are a couple of ways of doing this. From the Task Manager, Under Performance Tab, click on the Resource Monitor as shown below.
Alternatively, you can search for the "Resource Monitor or resmon.exe" in the start menu.

– Click on the CPU tab
– As you can see, there is no associated handler as well. If there are associated handles, use the search field in the Associated Handles. With this handle, you can identify the process by looking at the Image or PID column and then kill it.

Step 3: Process Explorer from SysInternals: This is similar to using the method described in step 2 above. It depends on the tool you love most.
– For more information on the Sysinternals tool, see the following article. For more information on SysInternal Tools and how some of the Sysinternals tools are used locally on your device, please see the following link.

Alternatively, see how to use the SysInternal suit online tool from the following link.

Step 4: Reboot the Server:
– This is usually the last resort, but also did not fix my issue.

Unfortunately, non of these steps worked, not even a Server reboot.
Note: MDT was closed and the “install.wim” unmounted (discarded) and the install.wim file properly cleaned as shown below. See the following guide on how to unmount a Windows Image File (WIM), see the following link.

My solution: I ended up logging on using the local Administrator account and was able to delete the folder! Weird right?

This was not an issue with permission. For issues relating to permission, see the following articles, Folder Access Denied, you require permission from SYSTEM: Unable to delete old windows folder, Error: 0xc1510111 You do not have permissions to mount and modify this image and You require permission from trustedinstaller: How to delete or rename files protected by Trusted Installer.

I hope you found this blog post helpful. If you have any questions, please let me know in the comment session.

Notify of

Inline Feedbacks
View all comments
Would love your thoughts, please comment.x