O'Reilly logo

Windows Server 2003 in a Nutshell by Mitch Tulloch

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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

Display a list of shared files open on the server:

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

Close the open file:

                     net file 2765 /close
The command completed successfully.

Notes

  • net file should be typed on the console of the server on which 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 in Chapter 4).

See Also

net session, net share, net use, net view, Shared Folders

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required