NTFS junction point

In computing, a NTFS junction point (JP) is a type of NTFS reparse point in the NTFS file system. It requires a NTFS 5.0 file system, which can be created (or converted from a FAT partition) under Windows 2000 and Windows XP. It can be used in a similar way to symbolic links - allowing you to create a link to a folder that is, for most intents and purposes, the same as the folder itself. This has many benefits over a windows shortcut (.lnk) file, such as allowing you to access files within the shortcut via explorer, the console, etc.

Note: junction points link to folders only, if you want to create a similar link with files, use hard links.

Contents

Warning

  • NOTE: Microsoft strongly recommends:
    • Use NTFS ACLs to protect junction points from inadvertent deletion.
    • Use NTFS ACLs to protect files and directories targeted by junction points from inadvertent deletion or other file system operations.
    • Never delete a junction point using Explorer, a del /s command, or other file system utilities that walk recursively into directory trees. These utilities will affect the target directory and all subdirectories. Instead, use the utilities described below to delete junction points.
    • Use caution when applying ACLs or changing file compression in a directory tree that includes NTFS Junction Points.
    • Do not create namespace cycles with NTFS or DFS junction points.
    • Place all your junction points at a secure location in a namespace where you can test them out in safety, and other users will not mistakenly delete them or walk through them.
  • Obscure: There are issues relating to junction points on Win2000 domain controllers & certain Active Directory files. See [1] (http://archives.neohapsis.com/archives/sans/2000/0014.html) for more details.

Examples of use

Program redirection

By setting a JP that points to a directory containing a particular version of a piece of software, you can easily add another version of the software and simply redirect the JP to point to the new version (can cause problems with some software, but works with quite a bit - experiment.)

Space saving

If you are running out of space on a drive, you can move those files to a new drive - but this can cause some problems with old links, configuration files, registry, etc. By creating a JP at the previous location (pointing to the new location) windows will treat it the same as if the directory still exists there, but you save HDD space.

Observed effects

WinXP Pro

Explorer

  • Deleting a JP using explorer is not safe - it will delete the targeted files immediately if using shift-delete.
  • Beware: if the JP is sent to the recycle bin, the targeted files will look safe, but will be deleted when the recycle bin is emptied.
  • Moving the JP to a different location on the same drive only moves the JP, however moving to another drive turns the JP into a normal folder and moves all files there (leaving the targeted directory empty).
  • Whilst walking through the directory with explorer, it seems impossible to delete folders, however files can be deleted.
  • A solution for this issues is installing NTFS Link (see external links section), which makes sure that the Explorer handles junctions correctly.

Console

(command prompt - cmd.exe)

  • The console under Windows XP automatically recognizes junction points, displaying <JUNCTION> instead of <DIR> in directory listings.
  • Any commands that would normally affect files inside a normal directory will act the same here, so don't use del myjunction - this will just delete all the files in the targeted folder.
  • rmdir & move seem to work fine with junctions, with the caveat that move wont let you move the junction to another volume (as opposed to Windows explorer, as mentioned above.)
  • rmdir seems safe in that it only deletes the JP, not the targeted files.
  • Whilst walking through the directory with the console, files can be deleted, but unlike explorer, directories can also be deleted (using rmdir /s dirname for example.)

General

  • Interesting tidbit: a hall of mirrors effect can be created by placing a JP in the folder it targets, usefulness of this is ...debatable.** ...

External links

Junction Link Magic (http://www.rekenwonder.com/linkmagic.htm) - a windows graphical interface for creating, updating and deleting junction points.
Winbolic Link (http://www.pearlmagik.com/winbolic/) - a windows graphical interface for creating, updating and deleting junction points and shortcuts.
Codeproject Article (http://www.codeproject.com/w2k/junctionpoints.asp) - a discussion on the source code of a junction point utility. Aimed at programmers.
NTFS-Link (http://www.elsdoerfer.info/ntfslink/) - windows shell extension that allows creating junction points and hard links. Existing junction points and hardlinks get marked by a small additional icon in the explorer.
Junction (http://www.sysinternals.com/ntw2k/source/misc.shtml#junction) - a command line utility & its source code.
PC Mag Article (http://www.pcmag.com/article2/0,4149,1183816,00.asp) about adding any folder to the start menu (so that you can view the contents as submenus). It links to a program [2] (http://www.pcmag.com/article2/0,4149,961598,00.asp) that achieves this using Junction points.
Microsoft Knowledge Base Article (http://support.microsoft.com/?kbid=205524) - 'How to Create and Manipulate NTFS Junction Points'
Navigation

  • Art and Cultures
    • Art (https://academickids.com/encyclopedia/index.php/Art)
    • Architecture (https://academickids.com/encyclopedia/index.php/Architecture)
    • Cultures (https://www.academickids.com/encyclopedia/index.php/Cultures)
    • Music (https://www.academickids.com/encyclopedia/index.php/Music)
    • Musical Instruments (http://academickids.com/encyclopedia/index.php/List_of_musical_instruments)
  • Biographies (http://www.academickids.com/encyclopedia/index.php/Biographies)
  • Clipart (http://www.academickids.com/encyclopedia/index.php/Clipart)
  • Geography (http://www.academickids.com/encyclopedia/index.php/Geography)
    • Countries of the World (http://www.academickids.com/encyclopedia/index.php/Countries)
    • Maps (http://www.academickids.com/encyclopedia/index.php/Maps)
    • Flags (http://www.academickids.com/encyclopedia/index.php/Flags)
    • Continents (http://www.academickids.com/encyclopedia/index.php/Continents)
  • History (http://www.academickids.com/encyclopedia/index.php/History)
    • Ancient Civilizations (http://www.academickids.com/encyclopedia/index.php/Ancient_Civilizations)
    • Industrial Revolution (http://www.academickids.com/encyclopedia/index.php/Industrial_Revolution)
    • Middle Ages (http://www.academickids.com/encyclopedia/index.php/Middle_Ages)
    • Prehistory (http://www.academickids.com/encyclopedia/index.php/Prehistory)
    • Renaissance (http://www.academickids.com/encyclopedia/index.php/Renaissance)
    • Timelines (http://www.academickids.com/encyclopedia/index.php/Timelines)
    • United States (http://www.academickids.com/encyclopedia/index.php/United_States)
    • Wars (http://www.academickids.com/encyclopedia/index.php/Wars)
    • World History (http://www.academickids.com/encyclopedia/index.php/History_of_the_world)
  • Human Body (http://www.academickids.com/encyclopedia/index.php/Human_Body)
  • Mathematics (http://www.academickids.com/encyclopedia/index.php/Mathematics)
  • Reference (http://www.academickids.com/encyclopedia/index.php/Reference)
  • Science (http://www.academickids.com/encyclopedia/index.php/Science)
    • Animals (http://www.academickids.com/encyclopedia/index.php/Animals)
    • Aviation (http://www.academickids.com/encyclopedia/index.php/Aviation)
    • Dinosaurs (http://www.academickids.com/encyclopedia/index.php/Dinosaurs)
    • Earth (http://www.academickids.com/encyclopedia/index.php/Earth)
    • Inventions (http://www.academickids.com/encyclopedia/index.php/Inventions)
    • Physical Science (http://www.academickids.com/encyclopedia/index.php/Physical_Science)
    • Plants (http://www.academickids.com/encyclopedia/index.php/Plants)
    • Scientists (http://www.academickids.com/encyclopedia/index.php/Scientists)
  • Social Studies (http://www.academickids.com/encyclopedia/index.php/Social_Studies)
    • Anthropology (http://www.academickids.com/encyclopedia/index.php/Anthropology)
    • Economics (http://www.academickids.com/encyclopedia/index.php/Economics)
    • Government (http://www.academickids.com/encyclopedia/index.php/Government)
    • Religion (http://www.academickids.com/encyclopedia/index.php/Religion)
    • Holidays (http://www.academickids.com/encyclopedia/index.php/Holidays)
  • Space and Astronomy
    • Solar System (http://www.academickids.com/encyclopedia/index.php/Solar_System)
    • Planets (http://www.academickids.com/encyclopedia/index.php/Planets)
  • Sports (http://www.academickids.com/encyclopedia/index.php/Sports)
  • Timelines (http://www.academickids.com/encyclopedia/index.php/Timelines)
  • Weather (http://www.academickids.com/encyclopedia/index.php/Weather)
  • US States (http://www.academickids.com/encyclopedia/index.php/US_States)

Information

  • Home Page (http://academickids.com/encyclopedia/index.php)
  • Contact Us (http://www.academickids.com/encyclopedia/index.php/Contactus)

  • Clip Art (http://classroomclipart.com)
Toolbox
Personal tools