Openfiles, Display Files Opened By Network Users

Martin Brinkmann
Jul 4, 2011
Tutorials, Windows, Windows tips
|
0

The command line tool openfiles has been part of the Windows operating system for a long time. It basically can be used to display all system files that are currently opened by users of the same computer network. One of its applications is to analyze file access errors. It is for instance usually not possible to delete or modify a file if it is currently opened by another user on the network.

The openfiles tool requires administrative privileges, at least under Windows 7. This means that you need to start the command prompt with elevated rights. One way to do that is to click on the start orb, select All Programs and then Accessories. Right-click the command prompt entry and select Run as administrator from the context menu.

Enter openfiles and hit enter to run the command on the system.

Windows admins who are new to the command can use openfiles /? to display a list of available parameters:

OPENFILES /parameter [arguments]

Description: Enables an administrator to list or disconnect files and folders that have been opened on a system.

Parameter List:

  • /Disconnect Disconnects one or more open files.
  • /Query Displays files opened locally or from shared folders.
  • /Local Enables / Disables the display of local open files.
  • /? Displays this help message.

As you can see from the parameters, it is not only possible to display all open files, but also to disconnect a user from your system. Lets say you need to access a file that is blocked by another user in the network. You can use the command openfiles /disconnect /ID xx to disconnect users. Just replace xx with the ID of the file that is shown in the open files listing.

It is furthermore possible to disconnect a user completely with the command openfiles /disconnect /a user where user is the name of the user that is currently accessing the files remotely.

Additional information about the commands can be accessed in the following way:

  • OPENFILES /Disconnect /?
  • OPENFILES /Query /?
  • OPENFILES /Local /?

Disconnecting options include disconnecting all open file connections by names or modes. Wildcards are allowed to be used which means that the commands can be used to disconnect all users currently accessing files on the local system.

Advertisement

Previous Post: «
Next Post: «

Comments

There are no comments on this post yet, be the first one to share your thoughts!

Leave a Reply

Check the box to consent to your data being stored in line with the guidelines set out in our privacy policy

We love comments and welcome thoughtful and civilized discussion. Rudeness and personal attacks will not be tolerated. Please stay on-topic.
Please note that your comment may not appear immediately after you post it.