Windows下创建软件链接的命令

C:\Users\Administrator>mklink /D "%USERPROFILE%\.vscode" "D:\.vscode\"
当文件已存在时,无法创建该文件。

C:\Users\Administrator>mklink /D "%USERPROFILE%\.vscode" "F:\MyServer\VSCode-win32-x64-1.88.1\.vscode\"
为 C:\Users\Administrator\.vscode <<===>> F:\MyServer\VSCode-win32-x64-1.88.1\.vscode\ 创建的符号链接

C:\Users\Administrator>mklink /D "%APPDATA%\Code" "F:\MyServer\VSCode-win32-x64-1.88.1\Code\"
为 C:\Users\Administrator\AppData\Roaming\Code <<===>> F:\MyServer\VSCode-win32-x64-1.88.1\Code\ 创建的符号链接

自己的


# vscode 
mklink /D "%USERPROFILE%\.vscode" "F:\MyServer\VSCode-win32-x64-1.88.1\.vscode\"
mklink /D "%APPDATA%\Code" "F:\MyServer\VSCode-win32-x64-1.88.1\Code\"

# B站视频
mklink /D "%APPDATA%\bilibili" "D:\bilibili\user-data\"

# 钉钉
mklink /D "%APPDATA%\DingTalk" "D:\DingDing\user-data\"
mklink /D "%LOCALAPPDATA%\DingTalk_91" "D:\DingDing\User Data-Local\"

# 微信开发者工具
mklink /D "%LOCALAPPDATA%\微信开发者工具" "D:\Tencent\微信web开发者工具\微信开发者工具\"

# Node的包管理工具-yarn
mklink /D "%LOCALAPPDATA%\Yarn"  ""F:\Yarn\"
为 C:\Users\Administrator\AppData\Local\Yarn <<===>> F:\Yarn\ 创建的符号链接

# Sublime Text
mklink /D "%LOCALAPPDATA%\Sublime Text" "F:\Soft\Sublime Text 3\User Data"

# NodeJs
mklink /D "%LOCALAPPDATA%\npm-cache" "F:\MyServer\node\cache\"

# JetBrains
mklink /D "%LOCALAPPDATA%\JetBrains" "F:\JetBrains\User Data\"

# Google AndroidStudio
mklink /D "%LOCALAPPDATA%\Google\AndroidStudio2020.3" "D:\Android\Android Studio\User Data\"

# Google 浏览器
mklink /D "%LOCALAPPDATA%\Google\Chrome" "F:\Soft\Google Chrome\"

# PHP的 Composer
mklink /D "%LOCALAPPDATA%\Composer" "F:\Composer Data\"