62

Is there any way to mount a remote CIFS/SMB/SAMBA share as a folder/directory and not as a drive letter. For example, I want this map:

\\Server\ShareName -> C:\Folder\ShareName

Instead of the usual map like this:

\\Server\ShareName -> Z:\

The server is Linux/Samba and the client is Windows 7 Professional 64-bit. The closest I've found is being able to mount a local volume as a subfolder using the Windows disk manager, but it doesn't appear to handle remote CIFS shares (see http://support.microsoft.com/kb/307889).

Anagoge
  • 723

3 Answers3

77

Just to map a network share directory you would use this command:

net use \\Server\ShareName\Directory

This mapping would:

  • not be persistent
  • would have to be established and authenticated at user login
  • you would access the share using the UNC path, and not a local drive letter

If you want to access the network share through a location on your local C: drive, you'll want to set up a symbolic link:

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

Now when you navigate to C:\Folder\Share you'll see the contents of \\\Server\Sharename\Directory. You'll still need to provide authentication for the resource with something like net use (or just be logged into a domain account on a domain system that has access) otherwise the link will probably error out angrily.

Bob
  • 2,599
1

http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/mountvol.mspx?mfr=true

From the horses mouth:

If you are running out of drive letters to use, mount your local volumes with no drive letters.

romant
  • 536
1

Click "Start", then click Computer. You're now in 'My Computer/Explorer'.
Right-click Computer, and click "Add a network location"
Then enter the server and share you would like to connect to

\\[servername]\[sharename]
Nunya
  • 578