I have very little local disk storage and I need to install the VS Code extensions to another directory. Is it possible to do it? How can I do it?
1 Answer
You can do this by using Symlinks.
Symlinks, or symbolic links, are “virtual” files or folders which reference a physical file or folder located elsewhere, and are an important feature built in to many operating systems, including Linux and Windows.
A symlink is essentially a pointer to a file or folder located elsewhere, consumes little space and is very fast to create (compared to copying a file and its contents).
The syntax is simple:
mklink /H Link Target
/H means that you'll make a "hard" link, as opposed to a "soft" or "symbolic" link.
When you open a soft link to a folder, you will be redirected to the folder where the files are stored. However, a hard link makes it appear as though the file or folder actually exists at the location of the symbolic link, and your applications won’t know any better.
https://www.howtogeek.com/howto/16226/complete-guide-to-symbolic-links-symlinks-on-windows-or-linux/
C:
, which also eliminates the need to backup user data if needing to do a clean install or Reset; to do so, go to each folder's Properties → Location tab within%UserProfile%