How to create a shared network folder in command line

Exclusive, high-quality data for premium business insights.
Post Reply
Rina7RS
Posts: 573
Joined: Mon Dec 23, 2024 3:46 am

How to create a shared network folder in command line

Post by Rina7RS »

In the above example, the command Net Sharedisplays all the shares and their information on the command line. It also shows notes that tell us which shares were shared by default or other related information.

You can also create shared network folders directly from the command line using the command Net Share. Here is the syntax for creating a shared folder:

Net Share [ShareName]=[PathToFolder] Grant:[Username],[Permissions]
In the command above, the items inside the square brackets [] are variables and need to be changed. Here's what these variables mean:

[ShareName]: Assign a name to the shared folder you are creating.
[PathToFolder]: Enter the full path to the folder you want to share. The folder must already exist.
[Username]: The user account with whom you want to cameroon telegram data share the folder.
[Permissions]: Select Read , Modify , or Full – determines the permissions granted to the user account.
Here is an example syntax for creating a shared folder from the command line:

Net Share ShareOne=D:\Shared Grant:Subhan,FULL
Create a shared folder using command line

Create a shared folder using command line

After this step, if I go to the folder sharing properties using Windows GUI, I will find that the user "Subhan" has been granted full permissions to the "Shared" folder on drive D.

Full permissions have been granted to the user account for the shared folder

Full permissions have been granted to the user account for the shared folder

As mentioned earlier, you can also specify how many users can access the shared folder at the same time. This can be done with the following command:

Net Share [ShareName]=[PathToFolder] Grant:[Username],[Permissions] Users:[NumberOfUsers]
In this command, you should also replace the [NumberOfUsers] variable and enter the number of concurrent users that will be allowed to access the shared folder. Here is an example of this command.
Post Reply