# Which program is using my file?

**URL:** <https://boards.straightdope.com/t/which-program-is-using-my-file/558428>\
**Category:** Factual Questions\
**Created:** [October 26, 2010, 6:27pm UTC](https://boards.straightdope.com/t/which-program-is-using-my-file/558428 "2010-10-26T18:27:39Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![OldGuy](https://avatars.discourse-cdn.com/v4/letter/o/3bc359/32.png) [@OldGuy](https://boards.straightdope.com/u/OldGuy)\
**Post date:** [October 26, 2010, 6:27pm UTC](https://boards.straightdope.com/t/which-program-is-using-my-file/558428/1 "2010-10-26T18:27:39Z")

</div>

Occasionally I try to delete a file and am told by Windows (XP) that I can’t as the file is in sue by another program. Usually this is correct, but fairly often it’s some kind of error – I assume the program didn’t quit completely or whatever since I still get the message if I quit every program,

Is there a way to query a file and see what program is using it?

---

<div class="post-metadata">

**Author:** ![Jas09](https://avatars.discourse-cdn.com/v4/letter/j/d07c76/32.png) [@Jas09](https://boards.straightdope.com/u/Jas09)\
**Post date:** [October 26, 2010, 7:00pm UTC](https://boards.straightdope.com/t/which-program-is-using-my-file/558428/2 "2010-10-26T19:00:00Z")

</div>

Process Explorer from Microsoft’s Technet will let you search for a file handle and tell you what process is using it.

> **[Process Explorer - Sysinternals](https://learn.microsoft.com/en-us/sysinternals/downloads/process-explorer)**
>
> Find out what files, registry keys and other objects processes have open, which DLLs they have loaded, and more.

---

<div class="post-metadata">

**Author:** ![thelurkinghorror](https://avatars.discourse-cdn.com/v4/letter/t/7c8e57/32.png) [@thelurkinghorror](https://boards.straightdope.com/u/thelurkinghorror)\
**Post date:** [October 26, 2010, 7:01pm UTC](https://boards.straightdope.com/t/which-program-is-using-my-file/558428/3 "2010-10-26T19:01:53Z")

</div>

When some program (usually antivirus) is gobbling up my USB stick so that I can’t eject it, I find that [Unlocker](http://download.cnet.com/Unlocker/3000-2248_4-10493998.html) works well for that. It will tell me what program is holding it and gives me the option to terminate the process. I am not sure if that is the best option for you but hopefully it helps. You do not need to terminate the program and can close in manually too once you know the name.

---

<div class="post-metadata">

**Author:** ![Darth\_Panda](https://avatars.discourse-cdn.com/v4/letter/d/ee7513/32.png) [@Darth\_Panda](https://boards.straightdope.com/u/Darth_Panda)\
**Post date:** [October 26, 2010, 7:25pm UTC](https://boards.straightdope.com/t/which-program-is-using-my-file/558428/4 "2010-10-26T19:25:54Z")

</div>

Usually, you can just delete it using DOS in a command prompt window.

---

<div class="post-metadata">

**Author:** ![Al\_Bundy](https://avatars.discourse-cdn.com/v4/letter/a/e79b87/32.png) [@Al\_Bundy](https://boards.straightdope.com/u/Al_Bundy)\
**Post date:** [October 26, 2010, 9:00pm UTC](https://boards.straightdope.com/t/which-program-is-using-my-file/558428/5 "2010-10-26T21:00:05Z")

</div>

You can check the task manager process tab and see which process is still running. This requires that you know the names the program uses for the process. It’s a good idea to periodically go through all the processes and start items to know what they are. Google for the names you don’t understand. Answers will come easily. I know that when I close Outlook Express, the process keeps running until I shut it down or shut the computer down. Firefox takes a long time to finally stop running too.

---

<div class="post-metadata">

**Author:** ![Markxxx](https://avatars.discourse-cdn.com/v4/letter/m/5daacb/32.png) [@Markxxx](https://boards.straightdope.com/u/Markxxx)\
**Post date:** [October 27, 2010, 12:43am UTC](https://boards.straightdope.com/t/which-program-is-using-my-file/558428/6 "2010-10-27T00:43:44Z")

</div>

I also second [Unlocker](http://www.snapfiles.com/reviews/Unlocker/Unlocker.html)

---

<div class="post-metadata">

**Author:** ![njtt](https://avatars.discourse-cdn.com/v4/letter/n/ecd19e/32.png) [@njtt](https://boards.straightdope.com/u/njtt)\
**Post date:** [October 27, 2010, 10:01am UTC](https://boards.straightdope.com/t/which-program-is-using-my-file/558428/7 "2010-10-27T10:01:15Z")

</div>

> [@OldGuy](#):
>
> Occasionally I try to delete a file and am told by Windows (XP) that I can’t as the file is in sue by another program.

It is a sign of the times. Software itself is getting litigious these days.
