Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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. \AppData\Roaming\Code 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:\Users\me\AppData\Roaming\Code C:\myFolder\Code

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

like image 468
user3120554 Avatar asked Aug 01 '17 17:08

user3120554


People also ask

Can I move files from AppData?

Users cannot move this folder the way they can move an app installation because apps are hardwired to look for it in its default location. If you need to move AppData, you will have to use a junction or a symbolic link. Decide where you want to move AppData to, and move the folder to the new location.

How do I move a File from one directory to another in VS Code?

You can use drag and drop to add folders to a workspace. Drag a folder to the File Explorer to add it to the current workspace. You can even select and drag multiple folders. Note: Dropping a single folder into the editor region of VS Code will still open the folder in single folder mode.

How do I get out of a directory in VS Code?

You can either select File > Open Folder in a open windows of VSCode or select File > New Window and in there File > Open .

What happens if I move AppData folder?

Just moving the folder is not enough. Once you have moved it, you must replace the original with a symbolic link to the new location. This will make windows think the data is still located on your C drive, while it actually is on your D drive.


1 Answers

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:

..data\extensions
..data\user-data

Then you can copy your company folders with files from

%APPDATA%\Code\User\

Then copy the extensions directory to data:

%USERPROFILE%\.vscode\extensions

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

like image 90
AndriuZ Avatar answered Oct 10 '22 02:10

AndriuZ