Skip to content

Instantly share code, notes, and snippets.

@BoQsc
Created September 8, 2022 07:21
Show Gist options
  • Save BoQsc/c8f5471c917f5df642663406b39f439e to your computer and use it in GitHub Desktop.
Save BoQsc/c8f5471c917f5df642663406b39f439e to your computer and use it in GitHub Desktop.
Symlink files to Windows folder.
@BoQsc
Copy link
Author

BoQsc commented Sep 8, 2022

mklink "C:\Windows\tcc.exe" "C:\Users\Windows10\Downloads\tcc-0.9.27-win64-bin (1)\tcc.exe"

@BoQsc
Copy link
Author

BoQsc commented Sep 8, 2022

@ECHO OFF
mklink "C:\Windows\tcc.exe" "C:\Users\Windows10\Downloads\tcc-0.9.27-win64-bin\tcc.exe"
mklink "C:\Windows\symlink_file2.txt" "C:\Users\Windows10\real_file.txt"
pause
symbolic link created for C:\Windows\tcc.exe <<===>> C:\Users\Windows10\Downloads\tcc-0.9.27-win64-bin\tcc.exe
symbolic link created for C:\Windows\symlink_file2.txt <<===>> C:\Users\Windows10\real_file.txt
C:\Users\Windows10>symlink_file2.txt

C:\Users\Windows10>tcc.exe
The system cannot find the file C:\Windows\tcc.exe.

@BoQsc
Copy link
Author

BoQsc commented Sep 8, 2022

@ECHO OFF
CD %~DP0
mklink "tccus.exe" "C:\Users\Windows10\Downloads\tcc-0.9.27-win64-bin\tcc\tcc.exe"
PAUSE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment