Name

net file

Synopsis

Displays a list of shared files that are open and closes them.

Syntax

net file [id [/close] ]

Options

none

Lists the shared files on the server that are open

id

Represents the identification number of the file

/close

Closes the file

Examples

To display a list of shared files open on the server:

                     net file
ID     Path                   User name            # Locks
-----------------------------------------------------
15     \PIPE\lsarpc           BACH$                0
2765   G:\pub\mydoc.txt       ADMINISTRATOR        0
The command completed successfully.

To close the open file:

                     net file 2765 /close
The command completed successfully.

Notes

  • net file should be typed on the console of the server where the shared file is located.

  • net files has the same effect as net file.

  • Closing a file removes any locks on the file.

  • Use the Shared Folders node in Computer Management to manage shared files with the GUI (see Shared Folders).

Get Windows 2000 Administration in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.