Mklink windows soft & hard link
make a symlink¶
on windows, you can have 1 folder in 2 places at the same time.
For folders, using /j
instead of /d
shows all individual files in source control.
this way code can be shared easily across 2 repos. e.g. when development happens in git, but distribution to artists uses a different source control.
unlink symlink¶
Warning
if you want to delete this link, do not delete it in explorer.
since this also deletes all content of the original folder.
instead use
Pay attention when linking to folders under sourcecontrol, since swapping branches can trigger a folder delete.
relative symlinks¶
you can cd to a directory, and just use folder names to make links relative. don’t use C:/ or it will be explicit.
e.g. mklink /j "vendor" "../vendor"
both types of slashes are accepted for paths
backlink to original folder¶
To see backlinks in the folder
print all symlinks
in a folder, source
to print all symlinks
for C:\Users
⚠️ slow if run on whole PC ⚠️
other commands¶
these commands have some issues where they don’t always list all links.
print symlinks
on your pc
print hardlinks
Get-ChildItem -Path "C:\Windows\","c:\","$env:USERPROFILE" -Force |
Where-Object { $_.LinkType -ne $null -or $_.Attributes -match "ReparsePoint" } |
ft FullName,Linktype,Target
Windows link file distribution
symlink
Backlinks¶
- test code in Blender
- or symbolic link mklink windows - soft & hard link
- TODO create local test env
- in the dev env, we hookup to code in the source repos
Unreal plugin to symlink plugins
mklink windows - soft & hard link
- in the dev env, we hookup to code in the source repos