mklink creates a symbolic link to a file. The below command creates a symbolic, or “soft”, link at Link pointing to the file Target :
mklink "c:\tmp\a.txt" "c:\tmp\b.txt"
will create link a.txt (destination) that is equal to b.txt (source)
Use /D to create soft link pointing to a directory. like so:
mklink /D "c:\tmp\dir_destination" "c:\tmp\dir_source"
Use /H to create hard link pointing to a file:
mklink /H "c:\tmp\dir_destination" "c:\tmp\dir_source"
Use /J to create hard link pointing to a directory, also known as a directory junction:
mklink /J "c:\tmp\dir_destination" "c:\tmp\dir_source"
mklink /J Link Target
And below command will remove symbolic link on a drive:
rmdir "c:\tmp\dir_destination"
mklink "c:\tmp\a.txt" "c:\tmp\b.txt"
will create link a.txt (destination) that is equal to b.txt (source)
Use /D to create soft link pointing to a directory. like so:
mklink /D "c:\tmp\dir_destination" "c:\tmp\dir_source"
Use /H to create hard link pointing to a file:
mklink /H "c:\tmp\dir_destination" "c:\tmp\dir_source"
Use /J to create hard link pointing to a directory, also known as a directory junction:
mklink /J "c:\tmp\dir_destination" "c:\tmp\dir_source"
mklink /J Link Target
And below command will remove symbolic link on a drive:
rmdir "c:\tmp\dir_destination"
No comments:
Post a Comment