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:
|
|
To list junctions beneath a directory, include the –s switch:
|
|
To create a junction c:\Program-Files for “c:\Program Files”:
|
|
To delete a junction, use the –d switch:
|
|
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)