Toggle Menu

Insights / Digital Service Delivery / How Do I Find Out What Process Has A File Or Folder Locked?

April 05, 2013

How Do I Find Out What Process Has A File Or Folder Locked?

2 mins read

I hate getting ‘Access Denied’ to a particular file or folder without explanation! As a developer, this happens to me regularly enough to be a pain, but not enough for me to actually have a good tool at my disposal for it.

Well, not until now.

Recently I finally was forced to find a good tool because something mysterious had my build folder locked, and we could not deploy our software anymore until it was fixed.  Rebooting the server would definitely work, but the problem would just creep in again, so I had to get to the source of the problem.

The key step was knowing what process was using the folder, as I couldn’t see anything logically or visibly that had it open. I have used Process Explorer in the past for this type of problem (and it’s great), but as far as I know you have to drill in or search by the process/handle, not the file or folder in question. In this case, and many other cases, I still didn’t know what had the folder locked.

A little searching yielded Handle.exe. Handle, like Process Explorer, is also a tool in the impressive Sysinternals suite. It is an extremely lightweight tool for doing exactly what I needed – give it a folder or file, and it lists what processes have it open.

Problem solved.

I have used unlocker programs in the past that will actually unlock the file or folder, but in my experience they didn’t always work and didn’t always tell you what actually was using the item. You really need this information to actually solve the problem as opposed to band-aiding it. Handle is also great because you can just copy the file onto any server or machine you want and run it. No worrying about installing something.

Thanks again, Sysinternals. I welcome this new tool permanently in my development or server maintenance toolkit.

You Might Also Like


Simplifying Tech Complexities and Cultivating Tech Talent with Dustin Gaspard

Technical Program Manager, Dustin Gaspard, join host Javier Guerra, of The TechHuman Experience to discuss the transformative...


How Federal Agencies Can Deliver Better Digital Experiences Using UX and Human-Centered Design

Excella UX/UI Xpert, Thelma Van, join host John Gilroy of Federal Tech Podcast to discuss...