Reputation: 15837
Is it possible to change the default opening and saving location when trying to open and/or save a file.
The default location seems to be the root, but I would like it to be the desktop.
Upvotes: 45
Views: 40479
Reputation: 230
To set the default open and save path in Visual Studio Code, follow the steps
Tested on VS Code 1.93.1 on Windows 11
Upvotes: 0
Reputation: 754
For Visual Studio Code (I'm on 1.82.0), do this:
File -> Preferences -> Settings
Enter "path" in the search
VSC should show "Files -> Dialog: Default Path" in the list at the top
Enter your desired path
Restart and check
Upvotes: 12
Reputation: 11
What worked for me:
Find the path of the folder - in my case it was in C:\Users\username\OneDrive\GitHub...
To change it:
Every file should open up as long as you open up the parent folder to the smaller directories.
Hope this helps. -Gorillana
Upvotes: 1
Reputation: 189
In case anyone is still looking for this, you set this in settings.json using the key "git.defaultCloneDirectory"
Upvotes: 3
Reputation: 302
You can change the location of your projects/solutions.
File -> Open -> Projects/Solutions
To do this modify
Tools -> Options -> Projects and Solutions -> Locations
I think that's the closest you can get.
Upvotes: -1
Reputation: 509
The topic is documented in multiroot workspaces. https://code.visualstudio.com/docs/editor/multi-root-workspaces
Just for reading, though I couldn't find default folder config by the first look into the article.
Upvotes: -3
Reputation: 9522
I haven't found anything in the Preferences settings that would support this, nor found anything stating that this is supported.
As you've stated yourself, the default location is the root of your system. At least, if you aren't working in a folder.
What you could do, of course, is simply open your ~/Desktop as a folder in VSCode. Then, automatically, your default save location is exactly as you'd like it to be.
Upvotes: 7