Professional Windows Server 1002003 Security A Technical Reference [Electronic resources]

Roberta Bragg

نسخه متنی -صفحه : 415/ 329
نمايش فراداده

net file

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