VSCode: moving files out of appdata directory

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP



VSCode: moving files out of appdata directory



I'm on a company laptop and appdata has restricted storage space. An initial google showed there isn't really any settings to move directories. I was thinking of simply copying relevant directories i.e. AppDataRoamingCode to somewhere else, then creating a hard symbolic link (junction) with the same name and then point it to the same location



i.e. in command line:


mklink /J C:UsersmeAppDataRoamingCode C:myFolderCode



I played around with moving the whole appdata folder (right click on roaming/local/locallow then click on properties then location tab then change directory). I managed to only move half the files over. it seemed to work until i restarted and it caused chaos.



I don't want the same thing to happen again with vscode. (that said I haven't tried using a symbolic link for appdata



what is everyone's advice? can i create a symbolic link and have everything work fine? or will i cause more chaos again? if it works for vscode, i'd like to do the same for appdata too




2 Answers
2



Symbolic links should work, but you can also tell VS Code to use a custom extension and user setting location with the --extensions-dir and --user-data-dir flags respectively


--extensions-dir


--user-data-dir


$ code --extensions-dir "/User/me/vscodeExtensions" --user-data-dir "/User/me/vscodeData"



There are some key limitations to this approach, such as extension updates not working. We are tracking support for a truly portable VS Code here: https://github.com/Microsoft/vscode/issues/329



Portable Mode in Visual Studio Code
You can use Portable Mode: After unzipping the VS Code download, simply create a data folder within Code's folder



After first launch 2 folders will be generated inside:


..dataextensions
..datauser-data



Then you can copy your company folders with files from


%APPDATA%CodeUser



Then copy the extensions directory to data:


%USERPROFILE%.vscodeextensions



Portable mode is not supported if you install VS Code. It is only supported if you get the ZIP download.






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

Firebase Auth - with Email and Password - Check user already registered

Dynamically update html content plain JS

How to determine optimal route across keyboard