none
mklink - <JUNCTION> vs <SYMLINKD>

    Question

  • Hi everyone,

    I'm not very sure if this is the correct forum for my question, but I guess you'd let me now where else to put this.

    What is the difference between the /D and /J options of the MKLINK command?

    Except for how they are diplayed by the DIR command, SYMLINKDs and JUNCTIONs behave, as far as I have explored this, exactly the same.

    Which of the two should be used for which particular task?


    Thanks in advance,
    pp23
    Friday, December 14, 2007 10:13 AM

Answers

  • Ok,now I've stumbled over a diffence.
    When it comes to using links accross SMB boundaries, JUNCTIONs cannot be used. Instead, SYMLINKDs still can!
    Wednesday, March 05, 2008 9:09 AM

All replies

  •  

    While there is http://www.howtogeek.com/howto/windows-vista/using-symlinks-in-windows-vista/ I too could use some more info.  

     

    Hard Link

    A hard link directly points to the file, and acts to the operating system as if it is the file itself. You'll want to use this option the majority of the time if you are trying to fake an application's directory.

    Soft Link

    A soft link is essentially a shortcut to a file or folder - if you are using Windows explorer, you'll be redirected to the directory if you double-click on a shortcut, it won't pretend its part of the filesystem. You can still directly reference or open a file with the symlinked path, and it mostly works.

     

    OK so a junction is the former while a symlink is the latter.  Why would I consider using a symlink when there's seemingly no disadvantage to using a junction.  If MS has any application notes or some sort of brief that explains the differences in terms of actual application examples, I would be most grateful for a reference.

     

     

    Friday, February 01, 2008 7:16 PM
  • Ok,now I've stumbled over a diffence.
    When it comes to using links accross SMB boundaries, JUNCTIONs cannot be used. Instead, SYMLINKDs still can!
    Wednesday, March 05, 2008 9:09 AM
  • Please read this http://technet.microsoft.com/en-us/magazine/cc162494.aspx  (scroll down to File-Based Symbolic Links)  and avoid various "geeks" - they don't know Windows like Russinovich Smile

     

    Monday, April 07, 2008 5:02 AM
  • I recently wondered myself what the difference was.  So, of course, I searched.

     

    As far as I can tell, in addition to supporting network paths, a <SYMLINKD> supports relative paths.  The relative path can be root-relative or relative to the folder containing the link.

     

    This is important if you are creating links in a folder you are considering moving or if the drive letter might change.

     

    On the other hand, symbolic links don't work on XP or Win2K3.  Neither explorer nor cmd will follow them.  Cmd will show both symbolic links and junctions as <JUNCTION> on XP. 

     

    The Sysinternals tool junction.exe v1.05 will show a <SYMLINKD> as "UNKNOWN MICROSOFT REPARSE POINT", even on Vista.

     

    The Microsoft tool linkd.exe says it can't open them.

    Monday, November 10, 2008 11:53 PM
  • NOTE - 

    While this is a very useful tool, it is very important to remember:

    Microsoft OS does NOT send files from NETWORK LOCATIONS to the Recycle Bin

    When you delete a file in ANY of the symbolic link folders they will BE GONE FOREVER

    UNLESS . . .

    unless you use Shadow Copy on the source folder's drive or software like Undelete by Diskeeper

    Tuesday, October 11, 2011 9:19 PM
  • NOTE - 

    While this is a very useful tool, it is very important to remember:

    Microsoft OS does NOT send files from NETWORK LOCATIONS to the Recycle Bin

    When you delete a file in ANY of the symbolic link folders they will BE GONE FOREVER

    UNLESS . . .

    unless you use Shadow Copy on the source folder's drive or software like Undelete by Diskeeper

    Good reminder...hadn't considered that.
    Thursday, March 15, 2012 5:31 PM