Eureka Moment Wiki

One eureka moment at the time

User Tools

Site Tools



This shows you the differences between two versions of the page.

Link to this comparison view

windows:client_os:mount_smb_cifs_to_folder [2019/10/31 09:06] (current)
Line 1: Line 1:
 +====== 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:
 +  - Mount the network share without specifying the drive letter
 +  - Create a folder where you want to mount the network share (this is optional)
 +  - Make a directory symbolic link to the newly mapped network share
 +<code bash>
 +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:
 +<code bash>
 +net use \\server\share /​USER:​username password
 +mklink /d c:\share \\server\share
 +<WRAP center round info 60%>Note that saving your password in a script is insecure and is not recommended.</​WRAP>​
windows/client_os/mount_smb_cifs_to_folder.txt · Last modified: 2019/10/31 09:06 (external edit)