A junction which is the equivalent of a symlink in NTFS.

A directory serves as an alias to another directory on windows.

For example, if the directory D:\WIN specified C:\WINNT\SYSTEM32 as its target, then an application accessing D:\WIN\DRIVERS would in reality be accessing C:\WINNT\SYSTEM32\DRIVERS.

Examples

To determine if a file is a junction, specify the file name:

1
junction c:\test

To list junctions beneath a directory, include the –s switch:

1
junction -s c:\

To create a junction c:\Program-Files for “c:\Program Files”:

1
junction c:\Program-Files "c:\Program Files"

To delete a junction, use the –d switch:

1
junction -d c:\Program-Files

Return codes

0 - on success -1 - on failed creation of new junction 0 - on failed deletion of junction (e.g. if file not found) 0 - on the check if a file is a junction fails (e.g. if file not found)

Download Junction

Reference

Junction v1.07