You are not logged in.

#1 05 Oct 2020 00:38

SweetTasha
New Member
Registered: 04 Oct 2018
Posts: 4

help with the syntax of the net use command

I'm trying to share a folder between 2 computer on my home WiFi network. I've tried to use a the net CMD command but I can't get the syntax right. I'd appreciate someone helping with this.

Here are the values that, I think, are probably relavent to the command.

2 computers a Dell desktop(PC) and a Microsoft Surface Book(SB):

PC
PC name: DESKTOP-ICK8NBM
PC WORKGROUP: 654Albion
PC user name: pwric
c:\User\pwric
PC Shared Folder Name: SHARE WITH SB
C:\Users\pwric\Documents\SHARE WITH SB

SB
SB name:DESKTOP-88C0JQ6
SB user name: Phil
SB WORKGROUP: 654Albion
c:\User\Phil

So far this is all I've tried:

C:\Users\pwric>net use C:\Users\pwric>net use C:\Users\pwric\documents\SHAREWITH SB
The syntax of this command is:

NET USE
[devicename | *] [\\computername\sharename[\volume] [password | *]]
[/USER:[domainname\]username]
blah-blah-blah

Any help will ber greatly appreciated.
SweetTasha

Offline

#2 05 Oct 2020 06:09

Try3
Member
Registered: 20 Jul 2019
Posts: 9

Re: help with the syntax of the net use command

net use is for use with folders that have already been shared and that are therefore referred to in this manner
\\DESKTOP-ICK8NBM\SHARE WITH SB
but your notes imply that you have not shared the folder and expect net ue to do that.  It does not.

Go to File explorer,
<select desired folder>,
right-click, Properties,
Sharing tab,
Advanced sharing,
Set the Share this folder checkbox,
Write your desired "ShareName" in the Share name: input box,
Click on Permissions,
Set the checkboxes for Full control / Change / Read as desired,
OK,
OK,
Close.

You can then, if you want to, run a net use command on the other computer to map the share to a drive letter.  It is just as easy to do this in File explorer - see
Map Network Drive - TenForumsTutorials
[I am not allowed to post links for reasons I do not know]
Do a search for
How to Map Network Drive or Disconnect Network Drive in Windows 10 site:TenForums
and you'll find it.

Offline

#3 05 Oct 2020 14:14

bluesxman
Member
From: UK
Registered: 29 Dec 2006
Posts: 1,129

Re: help with the syntax of the net use command

You're looking for the net share command to set up the share on the computer than contains the data you wish to share (AKA "server").

https://ss64.com/nt/net-share.html

As otherwise pointed out net use is for use at the other end, on the computer that wants to access such data (AKA "client").

https://ss64.com/nt/net-use.html

Last edited by bluesxman (05 Oct 2020 14:15)


cmd | *sh | ruby | chef

Offline

#4 15 Oct 2020 15:04

tra
Member
From: Andorra
Registered: 15 Oct 2020
Posts: 6

Re: help with the syntax of the net use command

if you have the same user and password on two computers you can do this:

net use \\machine1-or-ip same-pwd-on-two-machines /user:same-user-on-two-computers /persistent:yes /savecred

this command creates a connection to remote machine and you can acces to all folder that the user have permission on remote computer, like these:
- pushd \\machine1-or-ip\c$\Users\same-user-on-two-computers
- dir \\machine1-or-ip\c$\Users\same-user-on-two-computers


cmd|ps|rexx|ada|C|C++|C#|vba|java|js|rpg|cobol|mih|perl|al

Offline

#5 15 Oct 2020 21:24

Try3
Member
Registered: 20 Jul 2019
Posts: 9

Re: help with the syntax of the net use command

tra,

The OP is trying to share a folder not (map / get access to) an already-shared folder.
Which does your code do?

Denis

Offline

#6 15 Oct 2020 23:54

tra
Member
From: Andorra
Registered: 15 Oct 2020
Posts: 6

Re: help with the syntax of the net use command

Hi Denis, when the machines have the same user-password, you can access the remote resouces using command "net user" with the ip machine and user-password,  this create a connection on you can access all resources that have access the user , in this scenario, don't need to create a share folder because you can access to any folder that the user has authorization on remote machine using \\ip\c$\folder (to access a folder in disk c on remote computer)


cmd|ps|rexx|ada|C|C++|C#|vba|java|js|rpg|cobol|mih|perl|al

Offline

#7 16 Oct 2020 00:26

Try3
Member
Registered: 20 Jul 2019
Posts: 9

Re: help with the syntax of the net use command

tra,

Thanks for the explanation.

I should get the chance to experiment with this next month as I'm setting up a new computer then and I hope to have enough spare time available while I'm doing so.

Denis

Offline

Board footer

Powered by