Mounting a remote CIFS/SMB share as a folder on a local disk (not a drive letter) on Windows

If you, like me, don’t like seeing a lot of drive letters of mapped network shares in Windows Explorer, you can also mount them inside a folder on your local file system.

Here is how you do it:

  1. Mount the network share without specifying the drive letter
  2. Create a folder where you want to mount the network share (this is optional)
  3. Make a directory symbolic link to the newly mapped network share
net use \\server\share
mkdir c:\mount
mklink /d c:\mount\share \\server\share

Now, you can navigate to C:\mount\share and see the contents of \\server\share.

You’ll need to provide the network share credentials – net use will ask if you are not logged into a a domain account that has access.

This is not permanent, so if you need all the time, create a script:

net use \\server\share /USER:username password
mklink /d c:\share \\server\share

Note that saving your password in a script is insecure and is not recommended.

Enter your comment:
50 +5 =᠎
  • windows/client_os/mount_smb_cifs_to_folder.txt
  • Last modified: 2019-10-31 09:06
  • (external edit)