Who Has That Shared File Locked?

A common question that comes up when file shares are involved is “Why can’t I delete this file? Windows tells me the file is locked, but I have no idea who or what is locking it!”. With local files you can pretty easily answer this question using a tool like Process Explorer, but the process is bit different for files being accessed by a shared drive/folder,

Fortunately Windows Servers offer a “Share and Storage Management” MMC snap-in that can help answer this question. The Share and Storage Management snap-in is available on workstations as well, but you have to install a separate set of tools – that’s another story for another article.

The “Share and Storage Management” snap-in can be found in your Administrative Tools. In it, notice in the rightmost window pane there is an option “Manage Open Files…”

Manage open files

Clicking on “Manage Open Files…” will open a dialog window that will show you all of the files and folders being accessed over file shares. From there you can select individual files or folders and click the “Close Selected” (or Close All if you really want) to release that person’s lock on the shared file or folder.

Close selected

Be careful, though – certain programs will immediately reclaim the lock on the file even after you close the shared file session. Be sure to follow up with your users!

 
Comments

I am SO glad you started publishing articles. Good material, please keep up the good work 🙂

Leave a Reply