How to find out which process has a particular file open

Process ExplorerEver tried deleting, moving or renaming a file and got a terse message from Windows saying, you can’t ! With the reason being that the said file is in use by another process !

If you’ve ever been faced with one of those “Cannot delete a file because it is in use by another program” dialogue boxes, you’ll know how frustrating that can be.

The fact that you’ve closed every other program running on the system and still you get that message is even more annoying. So much for multitasking !

Windows, like all operating system, has no control over who requests to open a file. And when an application closes, it assumes that it’ll close and release control over all the files it opened. That sometimes doesn’t work. If an application crashes midway, or because of a bug forgets to close a file that it opened for use, Windows continues to assume that the file is still open by that application. And so if you go on to delete, move or do anything destructive with that file, you get this dreaded message.

Process Explorer

The problem is that Windows, by default, does not come bundled with any utility to help you overcome this problem. Although someone at Microsoft did recognize the need for such a tool and released the excellent Sysinternals Process Explorer.

Continue reading “How to find out which process has a particular file open”