Skip to content
Download

Search the user guide, questions, pages, the blog and release notes.

The file is open in another program

By Admiral CapyUpdated Written for version 1.1.8

“The action can’t be completed because the file is open in another program.” Windows shows this when you try to delete, rename or move a file that a program still holds open. The message often names a program you don’t have open, or none at all, since a program can hold a file without showing a window: a sync tool, a preview, an editor that closed its tab but kept the file.

CapyWatcher asks Windows which programs hold the file right now, and closes the one you choose. It works in every folder, tracked or not.

Find and close what holds it

  1. Select Cancel in Windows’ message. You’ll try again at the end.
  2. In Explorer, right-click the file, or the folder if Windows named a folder. On Windows 11, select Show more options at the bottom of the menu.
  3. Point at CapyWatcher, then select What’s using this file?. On a folder it reads What’s using this folder?.
  4. Read the list. Each row is one program, with the name of its program file, such as Code.exe, and the account that runs it.
  5. Select Close program on the row of the program that holds the file, then Close program again to confirm. The program closes as if you had closed it yourself, so it asks you to save first when it has unsaved work.
  6. When its row is gone, try your delete, rename or move again.

What’s using this file? explains every row and button of that window.

When Explorer holds the file

Explorer’s Close program button is greyed out, since closing Explorer closes the taskbar too. Most often a folder window that shows the file, or its preview pane, is what holds it. Close the Explorer windows that show the file’s folder, or turn off the preview pane in Explorer’s View menu, under Show. Then try again.

When the program doesn’t close

A program can stay open while it waits for you to save. Its row then says so: look for its window and answer it. If it doesn’t answer at all, select Stop on its row. Stopping ends the program at once, and any unsaved work in it is lost.

When no program is listed

The window reads “No program is using this file” in three cases:

  • The program already let go of it. Try your delete again.
  • A program on another computer holds it, in a folder you share on the network. Close it on that computer.
  • A command window has the folder as its current folder. Close the command window, or change its folder with cd.

When Windows itself holds the file

A Windows service is a program Windows runs in the background, with no window. The app never closes one, and a program Windows needs to keep running is left alone too: their Close program button is greyed out. Restart your computer, then delete the file before you open anything else.

Important

The app lists only programs on this computer. After the free trial, without a license, the answer reads “Locked” until you enter a license key. Stop ends a program without saving, so keep it for a program that no longer answers.

On this page
The file is open in another program