This post is archived and may contain outdated information. It has been set to 'noindex' and should stop showing up in search results.
How to Add to and Edit Windows Path Variable
May 12, 2017WindowsComments (1)
The Windows Path variable is a semicolon-delimited string of directory locations. These locations contain executable programs that can be called directly, without needing to type in the full file path.

For example: Say you're in a command prompt and want to call Android ADB. You might run a command like:

> C:\Program Files\Android\adb.exe

But if you have C:\Program Files\Android in your Windows Path, you only need to run:

> adb

Finding the Windows Path Variable

You must first find the Windows Path variable. Follow these steps (may be slightly different for Windows 8 or 10):

  1. Open the Start Menu
  2. Right-click on Computer and click Properties
  3. Click Advanced system settings
  4. Make sure you're on the Advanced tab
  5. Click Environment Variables
  6. Under System variables, scroll to find the Path Variable
  7. Click on Path and then click Edit

You should now see a window like this:

Windows Path Variable

Editing the Windows Path Variable

You can add to and edit directly in the system window, but due to its small size I recommend copying the Variable value and pasting it into a plain text editor like Notepad++. Once you've made your modifications, then copy and paste it back into the system window.

What I also recommend doing is splitting the variable into new lines for easier editing. For example, replace ; with ;\r\n, then when you're done editing remove all line breaks.

Windows Path Variable
Comments (1)
Add a Comment
Jan Girke   Jun 06, 2018
You can use path on the command line to show everything in the PATH variable and you can use path=%PATH%newpath; to add a directory to your path variable. Depending on the content you might have to add a semicolon ; between %PATH% and newpath.