junction
Package: WA2L/WinTools 1.2.08
Section: Library Commands (3)
Updated: 29 June 2025
Index
Return to Main Contents
NAME
junction - creates and lists directory links
SYNOPSIS
WA2LWinTools/(lib|lib/shell)/junction
junction
[
-nobanner
] [
-accepteula
] [
-s
] [
-q
] (
file
|
directory
)
junction
[
-nobanner
] [
-accepteula
]
junction_directory
junction_target
junction
[
-nobanner
] [
-accepteula
]
-d
junction_directory
AVAILABILITY
WA2L/WinTools
DESCRIPTION
Windows 2000 and later support junction points,
where a directory serves as an alias to another directory on the computer.
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.
Unfortunately,
Windows 2000 comes with no tools for creating junction points.
You have to purchase the Windows 2000 Resource Kit,
which comes with the linkd utility for creating junctions.
I therefore decided to write my own junction point-creating tool:
junction.
It creates NTFS junction points,
it allows you to see if files or directories are actually reparse points.
(Reparse points are the mechanism on which NTFS junctions are based.
The Remote Storage Service uses reparse points as well as volume mount points.)
Using
junction:
To obtain reparse point information:
junction [ -s ]
[ -q ]
( file | directory )
To create a junction point:
junction junction_directory
junction_target
To delete a junction point:
junction -d junction_directory
OPTIONS
-
-
help message.
- -s
-
recurse sub-directories.
- file
-
path to the file to query for reparse point information.
- directory
-
path to the folder to query for reparse point information.
- junction_directory
-
name of the junction point to create or delete.
- junction_target
-
full path to the target of the junction point to create.
- -d
-
delete the junction point
- -nobanner
-
do not display the startup banner and copyright message.
- -accepteula
-
suppress the display of the license dialog and accept the EULA.
ENVIRONMENT
-
EXIT STATUS
- 0
-
no error.
- -1
-
on failed creation of new junction.
FILES
-
EXAMPLES
- To determine if a file is a junction, specify the file name:
-
junction c:\test
- To list junctions beneath a directory, include the -s switch:
-
junction -s c:\
- To create a junction c:\Program-Files for "c:\Program Files":
-
junction c:\Program-Files "c:\Program Files"
- To delete a junction, use the -d switch:
-
junction -d c:\Program-Files
SEE ALSO
wintoolsintro(1),
lsw(1),
https://www.sysinternals.com/downloads/junction
NOTES
junction
has been developed by Mark Russinovich.
The majority of the documentation has been extracted from
the documentation on
https://www.sysinternals.com/downloads/junction.
BUGS
-
AUTHOR
junction was developed by Mark Russinovich and
integrated into WA2L/WinTools by Christian Walther. Send suggestions
and bug reports regarding the integration to wa2l@users.sourceforge.net .
COPYRIGHT
Copyright © 2025
Christian Walther
This is free software; see
WA2LWinTools/man/COPYING
for copying conditions. There is ABSOLUTELY NO WARRANTY; not
even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
This document was created by man2html
using the manual pages.
Time: 15:36:45 GMT, July 01, 2025