Windows – How to use a Windows share mapped using `net use \\host\share`

network-shareswindowswindows 7

How to use a Windows share mapped using net use \\host\share?

I've accidentally forgotten to include the device name, e.g. Z:, in the above command, resulting in the share being mapped without a corresponding network drive showing up in Windows Explorer. The mapped share is listed using net use.

Now, what can a mapped share, without a corresponding network drive, be used to? Is it possible to link the share to a network drive afterwards (how)?

Best Answer

resulting in the share being mapped without a corresponding network drive showing up

Technically, if a drive letter wasn't specified, then the share isn't mapped; it's only connected to.

Now, what can a mapped share, without a corresponding network drive, be used to?

Everything, because most programs accept UNC paths directly – mapping to a drive letter is optional. For example, you can open the path \\host\share in Explorer or Notepad or Word or any other program; you can even dir it from the Command Prompt. This has been possible ever since Windows 95 – for more than 20 years now.

Windows will automatically connect to shares whenever an UNC path is used, so technically you don't even need net use at all. However the command remains useful even without specifying drive letters, because it lets you specify a custom username and password.

That said, there are still valid reasons to use drive letter mappings: they let you quickly see used/free space in "This PC" ("My Computer"), they're shorter to type, and you can actually cd into them via Command Prompt.

Is it possible to link the share to a network drive afterwards (how)?

If you still want to map the share to a drive, simply repeat the command with a drive letter:

net use z: \\host\share
Related Question