File Links on Windows

Words: 90

On Windows, you can use hard links to associate two folders, letting the files be reused and avoiding having to modify both sides separately.

Core command: mklink

Type it in cmd to see the help output below:

cmd
1
2
3
4
5
6
7
8
9
MKLINK [[/D] | [/H] | [/J]] Link Target

        /D      创建目录符号链接。默认为文件
                符号链接。
        /H      创建硬链接而非符号链接。
        /J      创建目录联接。
        Link    指定新的符号链接名称。
        Target  指定新链接引用的路径
                (相对或绝对)。

Following the hint, enter something like:

cmd
1
mklink /J D:\sync1 D:\sync2

and the file contents of sync2 will be synced into sync1.

This post is licensed under CC BY-NC-SA 4.0. If it helped, or if you have anything to say, the comment box below is open.
Page views —
Unique visitors —

Loading...