Skip to content
Tech News
← Back to articles

Microsoft reveals why Windows 11 keeps saying a file is in use after closing app

read original more articles
Why This Matters

This article sheds light on the persistent 'file in use' error in Windows, explaining that it often results from background processes like antivirus scans or network references rather than the application itself still running. Understanding these underlying causes can help users troubleshoot more effectively and improve file management practices, which is crucial for both consumers and professionals in the tech industry.

Key Takeaways

If you are an avid Windows user, there might’ve been times when you tried to delete or rename a file in Windows and saw the message “The action can’t be completed because the file is open in another program”.

Well, as it turns out, Windows has been showing this error for decades, and it does not always mean what it says. Mark Russinovich, the now Azure CTO and Technical Fellow at Microsoft, recently addressed this issue. Russinovich, who first ran into this problem in the 1990s, created two tools specifically to deal with it.

What does ‘file in use’ error mean in Windows?

Yes, it is exactly what it sounds like, but here is a more technical explanation. Every time a program opens a file, Windows creates what is called a file handle.

A file handle is essentially a reference that Windows uses to track which program has access to which file at any given moment. Windows will not let you delete or rename a file while an open handle to it exists, because doing so could corrupt data that the program is still working with.

Normally, when you close an app, Windows releases those handles. But, as we have all experienced, closing the visible application does not always mean every handle is gone.

Why closing an app does not always release the file

Russinovich identifies three common reasons why a file stays locked after you think you’ve closed the program using it.

First, your antivirus software may be scanning the file. When antivirus runs a scan, it opens a file handle at the system level. Even if Media Player or Word has fully closed, the antivirus process can be scanning the same file in the background and holding it open.

When antivirus runs a scan, it opens a file handle at the system level. Even if Media Player or Word has fully closed, the antivirus process can be scanning the same file in the background and holding it open. Second, the file might be referenced from another PC on your network. If another device on the same network performed an operation that opened the file, that remote process may still hold a handle to it.

... continue reading