Skip to content
PCFixWorkbench

Files · Windows 11

Fix a file or folder that will not delete because it is open in another program

Written November 28, 2026

The 'open in another program' message means some process is holding the file open — often not the app you expect. Find the holder in Resource Monitor, close just that process or handle, and delete the file without a restart or a forced-delete tool.

What you need

Read the problem before you touch it

  1. The message is literal: a process has the file open. Windows will not delete a file that a running process holds open, and the dialog rarely names the process. The holder is often not the obvious app — a preview pane, a thumbnail generator, a backup or sync tool, or a crashed program that never let go.
  2. For folders, think contents, not the folder itself. A folder refuses to delete when anything inside it is open — including a Command Prompt or terminal window whose current directory is that folder, or an Explorer window previewing one of its files.
  3. Separate a live holder from a leftover one. If you closed the app an hour ago and the file is still locked, the process is either still running in the background or has hung. Task Manager's Processes list answers that in seconds: look for the app before assuming anything exotic.

The simple fixes, in order

  1. Close the obvious app — completely. Quit the program the file belongs to, including its system-tray icon, then try the delete again. Check Task Manager too: many apps minimize to the tray or leave a background process behind when their window closes.
  2. Restart Windows Explorer. Explorer itself holds files it is previewing or thumbnailing. In Task Manager, right-click Windows Explorer and choose Restart. The taskbar blinks and returns, any Explorer lock is released, and the delete often works immediately after.
  3. Find the holder in Resource Monitor. Open Resource Monitor (search the Start menu for it), go to the CPU tab, and expand Associated Handles. Type the file's name in that section's search box. The results name the exact process holding the file — this is the step that replaces all the guessing.
  4. Close that process and delete. If the holder is an app you recognize, close it normally. If it is a background process you can spare, right-click it in Resource Monitor and choose End Process — save other work first, since ending a process is abrupt. Then delete the file straight away, before anything opens it again.

The advanced route

  1. Close just the handle with Handle or Process Explorer. When the holding process is something you cannot stop — a service, or Windows itself — Microsoft's Sysinternals tools can close the single handle instead of the process. Handle lists which process has a file open from the command line, and Process Explorer can find and close a handle in its interface. Use this sparingly: closing a handle out from under a program can crash it or lose its data.
  2. Restart once, and delete before opening anything. A restart clears every handle, which is crude but decisive. Sign in, open nothing else, and delete the file first thing — before the app that keeps grabbing it has a chance to start. If a startup app re-locks it within seconds, disable that app in Task Manager's Startup tab for one restart.
  3. Delete from Safe Mode when a service always wins the race. If the holder is a service that starts before you can act, start in Safe Mode, where most third-party services and startup apps do not run, and delete the file there. Reserve this for files you are certain about — Safe Mode will happily delete things Windows normally protects you from touching.

End state

When it goes wrong

Related fixes

Sources