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.

Symbolic links were introduced an incredibly long time ago in Windows, yet I still encounter a large number of systems that use junction points. I know that symbolic links afford functionality not in junction points (e.g., they work on external drives); my question is whether there is functionality specific to junction points that make them more appropriate than symbolic links in some circumstances.

share|improve this question

2 Answers 2

up vote 3 down vote accepted

There's at least one circumstance where you can't replace a junction point with a symlink: if the content might need to be accessed remotely. If you access a file share on a Windows machine, junction points are interpreted by the server and work as expected. Symbolic links are interpreted by the client (i.e., a symlink to c:\foo\bar would be interpreted as pointing to the client's C drive) and are disabled by default anyway.

Incidentally, junction points do work on external drives.

share|improve this answer
3  
+1 We use junctions over symlinks for this exact reason. Makes it quite simple to create a latest or testing branch on a deployment server. –  jscott Jun 6 '12 at 3:11

I've never created a junction. I've created plenty of links.

Junctions are very old technology. They were introduced in Windows 2000, so they are compatible with every version of Windows. They are typically used only for directories on the same local volume. The classic example is for the C:\Windows\sysvol\sysvol\[your ad domain name] directory, that is actually a junction point to C:\Windows\sysvol\domain\.

Another piece of Windows trivia: In Windows 7, Microsoft created an infinite loop on the C:\ volume. The "C:\Users\%USERNAME%\AppData\Local\Application Data". "Application Data" is a junction that points to "C:\Users\%USERNAME%\AppData\Local\" for compatibility with legacy applications.

A Windows 7 system has thousands of links. Many exe and dll files located in the C:\Windows\system32 directory are actually links to files located in the C:\Windows\winsxs directory. That is one reason that the winsxs directory should not be "cleaned up". You can view the links by running the following command from the C:\Windows\system32 directory.

for %i in (*.exe,*.dll) do fsutil.exe hardlink list %i  

(If you run that in a cmd file, you may need two percent signs for the list %%i)

https://en.wikipedia.org/wiki/NTFS_junction_point

share|improve this answer
2  
That's a bunch of useful information, but none of it actually answers my question. –  Benjamin Pollack Jun 5 '12 at 15:30

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.