Helping people with computers... one answer at a time.

Windows will often report that a file is in use without telling you what program is using it. Process Explorer can tell you.

How can I find out who is using a "file in use"?

The scenario typically looks like this: you want to delete, move, perhaps rename a file, or maybe even just use it in another application and you get a message that you can't. The message indicates that another application is using the file.

Great. "What application?" you ask.

It wouldn't be that hard for Windows to tell you, but since it doesn't, you'll need to do a little investigatory work yourself. Fortunately there's a free tool.

When I'm faced with this situation, I grab my copy of SysInternals procexp.exe, a very nifty tool that does exactly what we need here (and a whole lot more). Procexp is, in a nutshell, Task Manager on steroids. I've referenced it in several answers as a great tool to use to see what's running on your system. However it's also a great tool to see who's got that file open.

Let's assume I'm trying to find out who has my mail folder open. In my case that's the file "personal.pst". I'll run procexp, and select Find, Find Handle.... (Every object such as an open file is identified by a unique number called a "handle" - procexp searches across all those objects, not just the files.) I'll enter in personal.pst and procexp will respond something much like this:

OUTLOOK.EXE        2956   C:\xfer\MAIL\personal.pst
OUTLOOK.EXE        2956   C:\xfer\MAIL\personal.pst
OUTLOOK.EXE        2956   C:\xfer\MAIL\personal.pst
"Fortunately there's a free tool."

Sure enough, as we might expect in this case, Outlook has the file open.

If you're networked there's another situation that might need an additional step. For example, I keep my email archives on a server so we'll look on that server to see who has this years archives, 2004.pst, open. On the server I'll use procexp as before to see who has 2004.pst open and the results will look much like this:

System             4      C:\admin\mail\2004.pst

OK, now that didn't help much. "System" is just that; the operating system. In this case it's probably the networking component of the system that manages file access from remote users. So who's the remote user opening the file?

This one's easy, and the tools are already on your machine. On the server right-click on My Computer, then select Manage, expand Shared Folders, and click on Open Files. There you'll see a list of files on the server that are currently opened by other computers on your network. That'll tell you the User who has the file open. You'll need to then click on Sessions to see what computer(s) that user is connecting from. In my case, 2004.pst is in use by my laptop. So I'll head over to my laptop, once again run procexp, and this time search for 2004.pst there. The results:

OUTLOOK.EXE        2956   \Device\LanmanRedirector\leo\mail\2004.pst
OUTLOOK.EXE        2956   \Device\LanmanRedirector\leo\mail\2004.pst
OUTLOOK.EXE        2956   \Device\LanmanRedirector\leo\mail\2004.pst

Sure enough, Outlook running on my laptop has 2004.pst open (three times, again - that's just an Outlook artifact). In this case you can see it's via something called the "LanmanRedirector" which is the part of Windows' networking software on my laptop that handles requests for files that are located across the network.

So for simple, "who's using this file?" procexp is a one-stop answer. If the network is involved it might take an additional step or two.

But the answers are definitely out there.

Article C1923 - April 11, 2004

Leo Leo A. Notenboom has been playing with computers since he was required to take a programming class in 1976. An 18 year career as a programmer at Microsoft soon followed. After "retiring" in 2001, Leo started Ask Leo! in 2003 as a place for answers to common computer and technical questions. More about Leo.

Not what you needed?

Recent Comments
44 Comments

Leo, thanks, this is THE software what I was searhing for a long time. It solved my problem. Thank You! :)

Posted by: Csongi bacsi at July 13, 2010 2:20 AM

I have many users who open files from the network and when they do they may get the message that it is in use but it often reports the wrong name. They are logged into the network and are using a mix of MS Office 2002, 2003(XP), or 2007. I am trying to find out what name Office uses to identify who has the file open.
Any help is greatly appreciated!

Typically it's the login name of user of the machine that is running the copy of Word that has the file open.
Leo
10-Sep-2010

Posted by: Bill April at September 8, 2010 9:49 AM

Thank you Leo! Worked perfectly.

Posted by: Allen at January 28, 2011 12:26 PM

made my day! :)

Posted by: Mohan Mathew at March 3, 2011 11:50 PM

Am I doing something wrong? I can't update a client's pc to XP SP3, with the error that volsnap.sys is in use. When I search for it, I get over hundreds of matching items. How do I find what process is locking the file?

Posted by: Mark at May 30, 2011 12:03 PM
Post a comment on "How can I find out who is using a "file in use"?":





Remember Me?

(You may use HTML tags for style)

Before commenting, please...

  • READ THE ARTICLE. A comment that shows you didn't will be deleted and ignored.

  • Comment only on the article. Use the search box at the top of the page if you have a question about something else.

  • NO PERSONAL INFORMATION in the comment. No email addresses. No phone numbers. No physical addresses.

  • Anything that looks the least bit like spam will be deleted. Links to unrelated sites or links that appear to be primarily promotional will be deleted, or the comment will be deleted.

  • Don't ask me to recover lost passwords or hacked accounts. I can't. Those comments will be deleted.

  • I can't respond to every comment. And I can't vouch for the accuracy of others who do.

Please wait. Your comment is being processed ...