Il semble que the junction command has been retired in Windows 10.
Vous pouvez download junction from Windows SysInternals (which is part of Microsoft):
Junction not only allows you to create NTFS junctions, it allows you to see if files or directories are actually reparse points. Reparse points are the mechanism on which NTFS junctions are based, and they are used by Windows' Remote Storage Service (RSS), aussi as volume mount points.
Please read this Microsoft KB article for tips on using junctions.
Notez que Windows does not support junctions to directories on remote shares.
So how do I create junctions or directory symbolic links in Windows 10?
Download junction as instructed above.
Now vous pouvez utiliser la commande suivantes.
Create a junction:
junction "C:\Documents and Settings\UserName\My Documents\My Dropbox\My Games" "C:\Documents and Settings\UserName\My Documents\My Games"
Create a directory symbolic link:
mklink /D "C:\Documents and Settings\UserName\My Documents\My Dropbox\My Games" "C:\Documents and Settings\UserName\My Documents\My Games"
Vous pouvez utiliser either mklink /j or junction in Windows 10 and upwards to create junctions.
Vous pouvez utiliser mklink /d in Windows 10 and upwards to create directory symbolic links.
Notes:
-
junction can also list junctions and determine if a file is a junction unlike mklink.
-
mklink is an internal command only available within a cmd shell.
-
By default Administrator privileges are required to create symbolic links.
It can also be granted to other users. The security setting "Create symbolic links" can be granted at:
Configuration\Windows Settings\Security Settings\Local Policies\User Rights Assignment\
Examples
Using mklink to create a directory symbolic link:
F:\test>mklink /d test-dir-sym-link test
symbolic link created for test-dir-sym-link <<===>> test
Using mklink to create a junction:
F:\test>mklink /j test-junction test
Junction created for test-junction <<===>> test
Using junction to create a junction:
F:\test>C:\apps\NirSoft\SysinternalsSuite\junction.exe test-junction test
Junction v1.06 - Windows junction creator and reparse point viewer
Copyright (C) 2000-2010 Mark Russinovich
Sysinternals - www.sysinternals.com
Created: F:\test\test-junction
Targetted at: F:\test\test
Further Reading