Category: cifs

Mount SMB network folder in local folder on Windows

The mklink command is available in Windows since Windows Vista. It allows you to map a location as a subfolder on a NTFS file system. This behavior is comparable to the Linux ln alternative. SMB/CIFS network folders can also be mapped using this technique.

The command to do this is:

mklink /d C:\Folder\ShareName \\Server\ShareName\Directory\

The command explained:

  • /d is a flag that tells mklink to create a directory symbolic link instead of the default, a file symbolic link
  • C:\Folder\ShareName is the destination locate to map the network share to
  • \\Server\ShareName\Directory is the SMB network folder location to use as source A requirement is that the \\Server\ShareName\Directory location has been visited before and the credentials to access the share have been stored. Once the command has been executed the network folder is directly available at \\Server\Sharename.

Leave a Comment