no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
— | windows:client_os:mount_smb_cifs_to_folder [2019/10/31 09:06] (current) – created - external edit 127.0.0.1 | ||
---|---|---|---|
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: | ||
+ | </ | ||
+ | Now, you can navigate to C: | ||
+ | |||
+ | 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 / | ||
+ | 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.</ | ||