Mklink is a command tool for creating symbolic links and hard links in windows. It is a good tool for solving file system problems. You need the administrator privilege to use it.
First, we will introduce the mklink command. You can refer to the following:
The description is also very detailed. Let's look at the example below.
The following figure shows how to create a symbolic link in windows. What are the differences between hard links and shortcuts.
Symbolic Link(Symbolic link)
- Run the command mklink link_name target_name.
- The icons and shortcuts after the link is created are similar.
- No space occupied in the system
- Not a single file in the file system
- Parse (!?) at the operating system layer (!?)
- If the source file is deleted, the link is useless.
- Removing source files does not affect symbolic links.
- Removing a linked file does not affect the source file.
Hard Link(Hard link)
- Run Command mklink/h link_name target_name
- The space occupied by the system is the same as the source file, but the referenced objects in the system are the same (not copies)
- Parse (!?) at the operating system layer (!?)
- The icon is different from the icon used to create a shortcut.
- Removing source files does not affect hard links.
- Removing a hard link does not affect the source file.
- If the source file is deleted, its content still exists through hard links.
- Any changes to the hard link file will affect the source file.
Shortcut(Shortcut)
- Right-click the selected source file and choose create from the drop-down menu.
- Shortcuts are completely separated from source files in the system
- Only those who know the shortcutsProgramKnow them
- If the source file is deleted, the link is useless.
- Removing source files does not remove shortcuts
- Removing shortcuts does not affect source files.
Original article: http://www.maxi-pedia.com/mklink
By the way, we recommend a simple tool to implement this function: link shell extension.