Feb 19, 2015

How to mount a network SMB/CIFS share as a folder in Windows

Today I was trying to figure out a solution to a problem that I will write more about tomorrow, but it involved having to figure out how to mount a network SMB/CIFS share as a folder instead of a drive letter in Windows. This was because the program I was using couldn't see network shares for some reason, and could only use folders on the C drive.

Well, it turns our it's pretty easy to do this from the command line. You run the following which creates a symbolic link folder to your CIFS share:

mklink /d  C:\FolderName\ \\Server\ShareName\

Obviously you need to modify the command to suit your needs. Also, you have to let the command create your linked folder. If you try to manually create the folder on your local drive before running the command, you will get an error saying, "Cannot create a file when that file already exists."

After that, you can access your CIFS share through the local folder, and programs will see that share now as a local folder.



Twitter Delicious Facebook Digg Stumbleupon Favorites More

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | stopping spam