This action cannot be completed because the file is open

When it is trying to delete a folder, an error message appears stating that the operation cannot be completed because the file is open in another program. If you are also facing this problem, then here are some quick working solutions for this problem.

The action cannot be completed if the file is open in another program. why does this happen ! let’s go

The operation cannot be completed because the file is open in another program –

  • Press Window key + R to open Run.
  • Write resmon.exe in it and click on OK.
  • Now, click on CPU tab.
  • Click on Associated Handles.
  • Now, search the folder name or file name in the search handle box.
  • Right click on the process from the list and choose End Process. (Note that the path to your folder is visible below the handle name)

Now, go ahead and try again. You will not face any kind of problem.

Restart Windows Explorer –

  • Press Ctrl + Shift + Esc simultaneously on your keyboard to open Task Manager.
  • Locate Windows Explorer, right click on it and select Restart.

Disable Controlled Folder Access –

  • Press the Windows key + S key simultaneously from the keyboard and search for Windows Security.
  • From the search result, click on Windows Security.
  • Click on Virus & Threat Protection.
  • Click on Manage Settings under Virus & Threat Protection Settings.
  • Under Controlled Folder Access, click on Manage Controlled Folder Access.
  • Turn off Controlled Folder Access.

Disable Preview Pane –

  • 1.If anyhow, you have enabled the preview pane, just disable it and try again.
  • If it is enabled just press Alt+P together to disable it. Or alternatively, you can just click View and then click Preview Pane to disable it.

Optimize the drive in which you created the folder –

  • Right click on the drive in which you have created the folder.
  • Select Properties.
  • Click on the Tools tab.
  • Select Optimize.