Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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).

share|improve this question

3 Answers 3

up vote 27 down vote accepted

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

net use \\Server\ShareName\Directory

This mapping would not be persistent and would have to be established and authenticated at user login, and 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're 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.

share|improve this answer
    
mklink appears to be the answer the OP wanted. –  mfinni Jan 28 '10 at 19:16
    
I thought so too, but I wasn't certain, if it turns out that's the case I'll edit things a bit. –  Bob Jan 28 '10 at 19:36
    
Yes, mklink is exactly what I needed. Thanks! I already saved the authentication details to my user account while testing various other methods of mapping the share. –  Anagoge Feb 4 '10 at 20:27
    
Any solution on XP? –  OrangeDog Dec 1 '11 at 16:37
3  
@Bob That would do ONLY if you want a shortcut. (more here: http://stackoverflow.com/questions/4339220/is-there-a-way-to-map-a-unc-path-to-‌​a-local-folder) But if you need a "working folder" the one some app could use you're, well we're out of luck. Bottom line you CAN NOT do a mapping of a network folder to a local folder only to a local disk! Again... according to Microsoft. Unfortunately... –  dorbar Jun 22 '13 at 18:17

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.

share|improve this answer
1  
I'm not sure I understand... In my case, I'm not running out of drive letters - I just don't want to assign/create more drive letters. I'm also not seeing a way to make mountvol mount network shares (the VolumeName param apparently wants a GUID representing a local volume name, not a network share). –  Anagoge Jan 23 '10 at 11:56

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]
share|improve this answer
    
This is kind of close, but it doesn't let me choose what folder to mount the share in. It seems to only allow "mounting" the share under "Network Location" in My Computer. Ideally, I could mount it in an arbitrary folder like C:\Folder\ShareName. Samba on Linux seems to allow this, so I was hoping that Windows did as well. –  Anagoge Jan 23 '10 at 21:44
    
You can not choose what folder to mount it in the way you can in Linux. You can however then create a shortcut to it on the desktop. –  Nunya Jan 23 '10 at 23:33
    
Once the shortcut is created as suggested by Nunya, right click on the shortcut and copy to the clipboard. Go to the folder where you would like to access the share and paste. The shortcut to the remote share is added. –  paul Jun 24 at 15:58

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.