How can I tell who has which files open on a machine?

A. To view which user has which files open, use the net-file command, which displays information in the form of ID, path, username, and number of locks. For example, I ran the net-file command and received the following results:

ID         Path                                    User name            # Locks
9          D:\index.lnk                            savillj               0
11         D:\john.lnk                             savillj               0
23         D:\\images\me.gif     savillj               0
27         D:\\images\mcse.gif   savillj               0
31         D:\\images\mvp.gif    savillj               0
35         D:\\images\40179.JPG  savillj               0
39         D:\www.savilltech...\goldeneye.gif      savillj               0
43         D:\www.savilltech...\Rita1sml.jpg       savillj               0
47         D:\www.savilltech...\Rita2sml.jpg       savillj               0
49         D:\\me.html           savillj               0
The command completed successfully.

You can also use the net-file command to delete a file lock. Enter

net file 47 /close

to remove this lock. To use the net-file command, you must have the server service running on the machine. From the Start menu, select Settings, Control Panel, then Services to see if the service is running. You can also use the Server Control Panel applet on the server that houses the file share. A freeware utility called Open File List (OFL) is available from and provides more information.

The best third-party applications that I’ve found are NTHandle (a command-line file-use utility) and NTHandleEx (a GUI version of NTHandle). Both utilities are available from

Hide comments


  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.