In Windows using NTFS file system there are 3 different possiblities to create links to folders.
(For files there are 2 possibilities: hard links and shortcuts.)
A shortcut is a .lnk file which has several hundred bytes that contains the link Information.
But what about the other two possibilities: Symbolic Links <=> Junctions?
According to FreeCommander both link "files" need 30 Byte each.
I'm able to create a junction by using
mklink /j LinkFolderToCreate ExistingFolder
To create a symbolic link I use
mklink /d LinkFolderToCreate ExistingFolder
The dir
command gives me the following Output:
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Temp\LinkTest\Folder>mklink /d SymLink ..\Link
symbolic link created for SymLink <<===>> ..\Link
C:\Temp\LinkTest\Folder>mklink /j Junction ..\Link
Junction created for Junction <<===>> ..\Link
C:\Temp\LinkTest\Folder>dir
Volume in drive C has no label.
Volume Serial Number is 40A4-35D4
Directory of C:\Temp\LinkTest\Folder
30.08.2018 12:09 <DIR> .
30.08.2018 12:09 <DIR> ..
30.08.2018 12:09 <JUNCTION> Junction [C:\Temp\LinkTest\Link]
30.08.2018 12:09 918 Shortcut.lnk
30.08.2018 12:08 <SYMLINKD> SymLink [..\Link]
1 File(s) 918 bytes
4 Dir(s) 63.696.363.520 bytes free
C:\Temp\LinkTest\Folder>
What are the differences between Symbolic Links and Junctions?
Which one would you take in which case?