How to retrieve a list of shared folders shared using a script

The following knowledgebase will explain the methods you can use to check the shared folders shared on local and remote computer.

To check on local computer:

You can use the following methods:

  1. Connecting to Remote Registry Service
  2. Using a script

The first method is easy but includes a lot of efforts. You can navigate to the following location in registry after connecting to remote registry:


The above registry key includes the list of shared folders in right pane.

To check on a Remote Computer:

You can use the below script to check the list of shared folders on a remote computer:

@echo off


Echo Computer Name, Shared Folders Lists >> Result.csv

SET Share_name=

For /F “Tokens=*” %%a In (%srvlist%) Do (

Set Comp_name=%%a

Set RegQry=”\\%%a\HKLM\System\CurrentcontrolSet\Services\Lanmanserver\Shares”

REG.exe Query %RegQry% > CheckCC.txt

FOR /f “Skip=4 Tokens=1” %%b in (CheckCC.txt) DO (

SET Share_name=%%b

Echo %Share_name% >> Result.csv



The above script will check remote computer for each registry entry in the right pane fto check the share name and the results will be saved in a CSV format file.

3 thoughts on “How to retrieve a list of shared folders shared using a script”

  1. i have a file fele server 2003 with member server. now i want to a create new file server with 2008 r2. how to i take share & permission detail. pls help

  2. also, flipboard mixes the gglooe-reader *read* items with *unread* items even after refreshing the list. i see there’s a mark unread option, but what’s the point, when all items are displayed, whether read or unread? this defeats the very purpose of gglooe reader. once an item has been read, it should NO LONGER APPEAR when viewing that folder or feed. period.finally, assuming that the above is a bug that will be fixed, can we PLEASE have the *option* (via preferences/settings) to have GR articles marked as read while simply flipping through pages in flipboard i.e., *without* our having to tap/zoom in on each article for it to be counted as read? i have hundreds of unread articles in GR, and i can’t possible tap on each one, just to have it counted as read. once we flip to the next page, the items on the previous page should automatically be marked as read. (or i’d like the *option* to make flipboard behave that way; i realize that behavior wouldn’t be optimal for all users).i was so happy to see gglooe-reader support, but these quirks prevent it from becoming a serious contender for one’s official gglooe-reader app. thanks.

Leave a Reply to sachin Cancel reply

Your email address will not be published. Required fields are marked *