Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.

Windows 7: MKLINK – Create and Use Links in Windows

04 Aug 2014   #30

Windows 7 Ultimate x64

I'm using makelink with a Classic Shell toolbar. I'd like to make it so that when I click an item it makes a link to it, but if there's nothing selected, have it make a link to the current folder. I was told I'd need a .bat file with the if argument. What exact commands would I use to make the file?
My System SpecsSystem Spec
06 Sep 2014   #31

Windows 7 Ultimate x64

Great tutorial

JunctionMaster - FREEWARE

Junction v1.06
My System SpecsSystem Spec
09 Sep 2014   #32

XP/32, 7/64

Hi Kari et al,

Thanks for starting a thread and hosting great contributions! Alas, I still need help getting across the goal line with network drives.

Using examples here and on MS's site, I created a test symbolic folder link called "Lighting" here:
"F:\junk\TESTING Standard Project Folder TESTING\Documents\17-Specifications"
It points to the "Lighting" folder here:
"N:\junk\TESTING Standard Project Folder TESTING\Drawings\04-Design Development\01 Finishes Lighting & Specifications\Lighting"
The link has these issues:
  • Right-clicking, selecting Properties and Open Folder Location leads to the Lighting folder (without opening it).
  • Double-clicking on the link in Windows doesn't throw an error, but does produce an "Open With" window with (irrelevant) choices.
  • Efforts to copy the link fail, claiming that "The filename, directory name, or volume label syntax is incorrect."
I really appreciate hearing of Skol's success. Does anyone have any ideas about what I'm doing wrong?

Thanks for all comments!
My System SpecsSystem Spec
09 Sep 2014   #33

Microsoft Community Contributor Award Recipient


Please post the mklink command exactly as you have given it (full paths, dots, colons, spaces and all characters as you have used them in the command, using the exactly same syntax you have used).

An example mklink command:

mklink /j D:\Docs E:\Users\Kari\Documents

I want you to post your command as above, the complete command line.
My System SpecsSystem Spec

09 Sep 2014   #34

XP/32, 7/64

Thanks! It was created within admin-enabled command prompt while within the following directory:

"F:\junk\TESTING Standard Project Folder TESTING\Documents\17-Specifications"

mklink /d "Lighting" "N:\junk\TESTING Standard Project Folder TESTING\Drawings\04-Design Development\01 Finishes Lighting & Specifications\Lighting"

FYIs: F and N are the same location. The Properties browse confirms that Windows properly identifies it. I can't copy it in a window or in command prompt.
My System SpecsSystem Spec
09 Sep 2014   #35

Microsoft Community Contributor Award Recipient


One more question, is TESTING Standard Project Folder TESTING really name of a folder in your target's path? Also, the link must contain full path for example C:\Lighting or X:\Docs\Lighting. Your's only have "Lighting" without path.
My System SpecsSystem Spec
09 Sep 2014   #36

XP/32, 7/64

Oops; thanks, that makes the shortcut work as expected in the original location. Now, the shortcut/link works as expected there, and running the DIR command there describes the entity as a <SYMLINKD>.

The final hurdle is making the relative reference work on the live volume. This means copying it (or, in live use, the folder set in which it lives) to the production drive.

Here is where it appears to fail: When copied to the target location, the link becomes a directory there. In fact, it becomes a directory even when copied into a different folder in its own folder set.

I had thought that the symbolic reference would enable me to create a portable link whose reference would always be relative to the specification regardless of location as long as the relevant folder structure remained intact.

Might I be trying to use the entity in a way that is different from its intended use, or might it not work on Windows 2008 virtual servers running over xenserver?
My System SpecsSystem Spec
10 Sep 2014   #37

Microsoft Community Contributor Award Recipient


The links and targets cannot be portable. Both link and target need an absolute path.
My System SpecsSystem Spec
10 Sep 2014   #38

XP/32, 7/64

Then I'm trying to use the symbolic link for something it's not intended to do. I'm looking for a way to build portable shortcuts (with relative references to their targets) into a template of folders so that, when users physically copy the template to a live destination, the copied shortcuts would point to the new destinations.

Autodesk uses "xrefs" - external references - in this way, with either absolute or relative references to files that support a main file being edited. Using relative references enables the entire file set to be moved to other drives or systems while preserving the external references.

Thanks for helping to clarify mklink and symbolic linking for me. I'll keep searching for my answer!
My System SpecsSystem Spec
26 Oct 2014   #39

Windows® 7 (64-bit)

I have a post-it notes type app on my system where I keep all sorts of computer related info, including one titled "Junction Point Creation" which I'll replicate here. This is how I had to word it to myself for it to be completely clear. Since a certain measure of uncertainty usually accompanies this issue for many, hopefully it'll help clear any confusion, Kari's excellent article notwithstanding. Then again it may make things worse  :

Step 1.
 Move the folder in question from its current location ( OLDLOC ) to the new location where you'd like it to reside from now on ( NEWLOC )

Step 2.
 Execute : mklink /j "OLDLOC" "NEWLOC"

Step 3. ( optional )
 Set the 'h' ( hide ) attribute to the folder in question in OLDLOC ( not NEWLOC—the preceding command will have made it "reappear" in OLDLOC, i.e. in its original location… hence, the 'h' attribute if desired )
My System SpecsSystem Spec

Thread Tools

Similar help and support threads
Thread Forum
I have two drives, an SSD for the OS (C:) and a platter drive for data (D:). I want to be able to hibernate my PC but don't want HIBERFIL to wear out my SSD as I have lots of memory (24GB) being written to the SSD every time I hibernate. Can anyone please advise me whether it's possible to move...
General Discussion
MKLINK - Can not create what is already there
Not correct sentence but it is original in Swedish. Because i am not a fan of printscreen, so i will post what i have written: C:\Windows\system32>mklink /d "C:\Users\Susanne\AppData\Local\Opera Software\Ope ra Stable" "E:\" I am not really shure about the differens between "j" and "d",...
General Discussion
Create Skydrive share links within file explorer
I'm using skydrive often and I really like it. I also Like the Feature that I can send a link to my friends so that they can download the file. Unfortunately I always need to login on the Web Interface to create the link - with a lot of clicks. Is there a way to create this link directly from...
Links Library - Create
How to Create a "Links" Library with Correct Icon in Windows 7 and Windows 8 This will show you how to create a Links library that has the correct Links folder icon on a glass plate for it's library icon in Windows 7 and Windows 8. The included folder C:\Users\(user-name)\Links is also the...
How to create my own folder links in the Start Menu
On the right hand side you have buttons (User, Pictures, Music, Video,etc) that I don't want/use. Would like to change some of these for my needs. Played around with it a bit but without luck. How do I do this?

Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd

All times are GMT -5. The time now is 23:03.
Twitter Facebook