Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change the default open file dialog path

In Visual Studio (I'm using 2010) is there a way to change which folder pops up by default when you go to open a file?

like image 905
Pete Avatar asked Sep 18 '10 17:09

Pete


People also ask

How can we add default directory while adding a path to a dialog field?

There are two methods for setting the initial path to your C:\MINE directory. The first is to enter the path into the Data field in this dialog box. Either overwrite the current path or place it in front of the current path. If multiple paths are defined in the field, they will need to be separated with a semi-colon.

What is Open File dialog?

OpenFileDialog component opens the Windows dialog box for browsing and selecting files. To open and read the selected files, you can use the OpenFileDialog. OpenFile method, or create an instance of the System.

What is the initial directory?

The InitialDirectory property is typically set using one of the following sources: A path that was previously used in the program, perhaps retained from the last directory or file operation. A path read from a persistent source, such as an application setting, a Registry or a string resource in the application.


2 Answers

For Visual Studio 2017 and 2019 you'll have to navigate from Tools->Options (Alt+T, O) then Projects and Solutions->Locations, there are 3 Locations but you will only need to edit the Projects location and click OK. No need to restart VS.

like image 143
Sebastian Avatar answered Sep 29 '22 12:09

Sebastian


There are a bunch of file locations in the registry at HKCU\Software\Microsoft\VisualStudio\10.0. The one you need to change is DefaultFileOpenLocation.

like image 34
Michael Beaton Avatar answered Sep 29 '22 14:09

Michael Beaton