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