如何在Windows下创建链接-解决磁盘空间不足的好工具

Windows xp Windows 2003:下载rktools工具箱.

http://www.microsoft.com/downloads/details.aspx?FamilyID=9d467a69-57ff-4ae7-96ee-b18c4790cffd&DisplayLang=en

http://download.microsoft.com/download/8/e/c/8ec3a7d8-05b4-440a-a71e-ca3ee25fe057/rktools.exe

命令示例:

linkd c:\source c:\destination

注意 c:\destination 要存在,命令执行成功后就将source目录连接到destination目录下了,而数据实际存储在destination中,但通过source和destination都能访问到destination目录下的内容。

Windows7+  Windows2018+:

直接使用mklink命令,具体使用方法如下:

Mklink

08/31/2016

2 minutes to read


Applies To: Windows Vista, Windows Server 2008, Windows Server 2012, Windows 8

Creates a symbolic link.

For examples of how to use this command, see Examples.

Syntax

Copy

mklink [[/d] | [/h] | [/j]] 

Parameters

ParameterDescription

/dCreates a directory symbolic link. By default, mklink creates a file symbolic link.

/hCreates a hard link instead of a symbolic link.

/jCreates a Directory Junction.

Specifies the name of the symbolic link that is being created.

Specifies the path (relative or absolute) that the new symbolic link refers to.

/?Displays help at the command prompt.

Examples

To create a symbolic link named MyDocs from the root directory to the \Users\User1\Documents directory, type:

Copy

mklink /d \MyDocs \Users\User1\Documents

来源:https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-R2-and-2012/cc753194(v=ws.11)

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容