You can close shared files or folders by using the Shared Folders Microsoft Management Console (MMC) snap-in or by using a command prompt.
Important | |
Users connected to a shared file or folder are disconnected when you close it. Users may lose data if you close an open shared file without warning. When possible notify users before closing files and disconnecting them. |
Closing an open file
To close an open shared file or folder by using the Windows interface |
-
Open Computer Management.
-
If the User Account Control dialog box appears, confirm that the action it displays is what you want, and then click Yes.
-
In the console tree, click System Tools, click Shared Folders, and then click Open Files.
-
Do one of the following:
- To close all open files and folders, on the
Action menu, click Disconnect All Open Files.
- To close a specific file or folder, in the
Results pane right-click the file or folder name, and then
click Close Open File.
- To disconnect multiple open files or folders,
press the CTRL key while clicking the file or folder names,
right-click any one of the selected files or folders, and then
click Close Open File. This closes the selected files or
folders.
- To close all open files and folders, on the
Action menu, click Disconnect All Open Files.
To close an open shared file or folder by using a command line |
-
To open an elevated Command Prompt window, click Start, point to All Programs, click Accessories, right-click Command Prompt, and then click Run as administrator.
-
If the User Account Control dialog box appears, confirm that the action it displays is what you want, and then click Yes.
-
Type:
net file <ID> /close
For example, to close an open file identified as myfile_id, type:
net file myfile_id /close
Value | Description |
---|---|
|
Displays the names of all open shared files or folders on a server and the number of file locks, if any, on each file or folder. |
|
The dynamically assigned ID of the shared file or folder. |
|
Closes the shared file or folder and removes file locks. Type this command from the server where the folder is shared. |
Notes | |
|