CMD Command to Find Shared Folders in Windows (NET SHARE)
In this tutorial, we will learn how to find shared folders on your Windows computer. We will also look at how to share a folder using the net share
command.
To find shared folders on a Windows PC, we can use the Computer Management console or net share command.
Using Computer Management console
First, we will look at how to find shared folders using the GUI. The following method works on both Windows 10 and Windows 11.
Open the Computer Management console - Right-click the Start button, and choose Computer Management.
In the console, expand the Shared Folders branch and click Shares. You will see the list of shared folders, as shown in the following screenshot.
Notice that the C:\
drive (and other drives) is shared by default. It is a hidden share, and other users on the network will not see it. Any share that has the dollar sign ($) at the end of the share name is a hidden share. This is the normal behavior of Windows.
Using the NET SHARE Command
The net share
command shows the list of shared folders on your Windows computer. This command works on both CMD and PowerShell.
net share
You will see an output similar to the following:
As I explained before, folders that have a dollar sign ($) at the end of the name are hidden shares, and the users on the network will not see them.
Sharing a Folder with NET SHARE Command
We can share a folder by using the net share
command, using the following syntax:
net share share_name=PATH
For example, to share the C:\data
directory as data, we will run the following command:
net share data=C:\data
Note that your computer will not be visible to other computers on the network until you Turn on Network Discovery and File sharing.
To stop sharing a folder, use the following command syntax:
net share share_name /delete
For example, to stop sharing the share name called data, you will run the net share
command as follows:
net share data /delete
To share folders with the net share
command, you need administrative privileges. Also, you can only share folders that already exist on the computer.