Windows – way to map a UNC path to a local folder on Windows 2003

localpathuncwindows

I know that I can map a UNC path to a local drive letter. However, I am wondering if there is a way to map a UNC path to a local folder. I have a program that has a specific folder hard coded into the program and I am wanting to try and create a folder with the same name that is mapped to a UNC path so that the data can be accessed from a network share. Is this doable? Specifically this is on a Windows 2003 server.

Best Answer

Yes, there is a way to map a UNC path to a local folder:

C:\>mklink /D Develop \\obsidian\Develop
symbolic link created for Develop <<===>> \\obsidian\Develop

This is because i want a build server to use my own PC's Develop folder as its Develop folder:

10/20/2012  11:01 AM    <SYMLINKD>     Develop [\\obsidian\Develop]

And there you have it.


MKLINK [[/D] | [/H] | [/J]] Link Target

        /D      Creates a directory symbolic link.  Default is a file
                symbolic link.
        /H      Creates a hard link instead of a symbolic link.
        /J      Creates a Directory Junction.
        Link    specifies the new symbolic link name.
        Target  specifies the path (relative or absolute) that the new link
                refers to.

Note: In my actual situation i needed another level of redirection, because the program i'm using realized that Develop was a symbolic link, pointing to a remote machine, and refused to comply. i told the program to shut up and do what it's told by giving it a junction that points to a local resource.

10/20/2012  11:06 AM    <JUNCTION>     Develop [C:\Develop2\]
10/20/2012  11:01 AM    <SYMLINKD>     Develop2 [\\obsidian\Develop]