4

I would like to know if somebody knows the correct syntax for giving a folder a share on remote network machine's folder. Please write a syntax you know for sure that it's working.

This operation should be on CLI- command line I'm having an error messages when trying to use:

net use x: \\someNetworkPath\

I get errors like :system error 53 has occured The network path was not found

I must say that in windows I can acess this network path.

Important Note: I'm doing net use before because the Net share command do not know what is UNC Path as far as I know

CSharper
  • 141

2 Answers2

1

Try net help use for usage:

> net help use
The syntax of this command is:

NET USE
[devicename | *] [\\computername\sharename[\volume] [password | *]]

Then try

net use x: \\computername\sharename
snapshoe
  • 1,186
0

Net Share is used to create a share on your machine

Net Use is used to connect to a remote share. Which I think is what you're asking. The correct syntax is:

net use * \\computername or IP\sharename

for instance:

net use * \\mycomputer\c$ -> this will connect to a share with the next available drive letter to a machine's hidden c:\ share.

net use x: \\mycomputer\music -> this will connect to a share called music on the remote computer named "mycomputer" and call it the x drive.

Both of those will use whatever user you are logged in as. You may have to give it the user name of the computer you are trying to connect to. So you would need to do:

net use * \\mycomputer\c$ /u:mycomputer\username

This will prompt you for a password of the user to the remote computer named "mycomputer"

It also sounds like you may want to create a share on a remote machine. You would have to use something like psexec if you want to do that.

Travis
  • 1,054
Jason H
  • 454