MoonPoint Support Logo


Shop Amazon Warehouse Deals - Deep Discounts on Open-box and Used ProductsAmazon Warehouse Deals

Advanced Search
Sun Mon Tue Wed Thu Fri Sat

Mon, Jul 24, 2023 1:16 pm

Stop sharing a folder on a Windows 2012 server

To stop sharing a folder on a Windows 2012 server, you can take the following steps:
  1. Hit Ctrl-Esc
  2. Type Computer Management and when you see Computer Management returned in the search results, click on it.
  3. In the Computer Management window, select Shares under Shared Folders, which is under System Tools.
  4. Right-click on the directory you no longer wish to share and select "Stop sharing".

    Stop Sharing folder

If you see a Shared Folders window open informing you that there are open files in the shared directory when you attempt to stop sharing it, you can click on Open Files, which appears beneath Shares in the list of options for Shared Folders in the Computer Management window to determine which files are open and which user account has them open.

Shared Folders open files

If you wish to close them from the server, you can, after you have selected Open Files to see the list of open files, right-click on a file and select the option to close it. You can also close all open files by selecting "More Actions" in the right pane of the Computer Management window, then "Disconnect All Open Files".

You can also see which files are open by opening a command prompt window with administrative access and issuing the openfiles command. You can open a commmand prompt window with administrator access by hitting Ctrl-Esc then typing command prompt and when you see "command prompt" returned in the search results, right-click on it and choose "Run as administrator". In the command prompt window, enter the command openfiles.


INFO: The system global flag 'maintain objects list' needs
      to be enabled to see local opened files.
      See Openfiles /? for more information.

Files opened remotely via local share points:

ID       Accessed By          Type       Open File (Path\executable)
======== ==================== ========== =====================================
27514635 Joe                  Windows    C:\..\Public\Documents\Books\Images
10066334 Joe                  Windows    C:\..\Documents\GRAA\2023\July
28185728 Joe                  Windows    C:\..\2023\Summer\Review\2023-06-26
25501373 Joe                  Windows    C:\..\Documents\MoonPoint\2023
22145930 Liz                  Windows    G:\..) (2023_07_15 23_24_31 UTC).pdf
28185729 Joe                  Windows    C:\..\Public\Documents\Books\Images
27514641 Liz                  Windows    G:\..) (2017_07_06 02_45_37 UTC).pdf
28856820 Joe                  Windows    C:\..\Documents\MoonPoint\2023
38923150 Joe                  Windows    C:\..\2023\Summer\Review\2023-06-26
22145934 Joe                  Windows    C:\..\Documents\GRAA\2023\July


If you can't determine which files are open because the full path to files is not displayed, i.e., two dots are displayed for a portion of the path, then you can add a format option (fo) to the command to display the output in a different format. E.g., if you add /fo list, i.e., openfiles /query /fo list when you query for the open files, you will then see the files displayed in a list format that will display the full directory path for each file that is open. Other format options for the display of output are table and csv. The csv option is for Comma-separated values. You can see a full list of options for the openfiles command by issuing the command openfiles /?.

[/os/windows/server2012] permanent link

Valid HTML 4.01 Transitional

Privacy Policy   Contact

Blosxom logo