Change the default Command Prompt Directory

Here is how you can change the default directory for the Windows Command Prompt

The Windows Command Prompt is the preferred Command-Line Interface for all Windows users. Although Microsoft introduced the PowerShell quite a while ago, the Command Prompt has still stuck around as the primary CLI for many hardcore users.

However, one problem with a CLI like the Command Prompt is that you have to use absolute paths or be able to navigate to the directory you want to play around with using commands like cd. There are ways you can make this easier, like being able to quickly open the Command Prompt from inside a folder or adding your files and batch scripts to the PATH folder so they can be accessed from anywhere.

One additional thing you can configure is to change the default path where the Command Prompt opens in. For example, when you open it, by default, it is set to open in your user directory. Fortunately, you can change it to open wherever you want.

Here’s how you can do that,

Change the Default Directory in Command Prompt

Note: This method will only work if you use the same CMD shortcut to open the file. If you open cmd directly from the Run dialog box, this won’t work.

  1. Press the Start button and search for cmd.
  2. Right-click on the search result and click on Open file location. It will take you the folder where the shortcuts of Windows applications like cmd, File Explorer, Run dialog box are placed.
  3. Just right-click on Command Prompt and click on Properties.
  4. Replace the path in the Start in box with the path of the directory where you want Command Prompt to open in, as shown in the screenshot below,

Now, if you open Command Prompt from anywhere in the system, it should open at the default directory you saved. In our case, it opens in the Downloads folder, as specified in the shortcut properties for the Command Prompt.