add dir to path


  1. Posts : 19
    win10 home
       #1

    add dir to path


    win10 pro, 22H2
    I want to add a couple subdirs to the path.
    did this a couple years ago but after finally finding the edit path in envir variables, it doesn't look familiar at all.
    I'm used to a string of subdirs separated by semicolons. all I have is 5 lines all beginning with %systemroot%.
    How do you add new subdirs to the path?
      My Computer


  2. Posts : 31,220
    10 Home x64 (22H2) (10 Pro on 2nd pc)
       #2

    dblake2 said:
    ....after finally finding the edit path in envir variables, it doesn't look familiar at all.
    I'm used to a string of subdirs separated by semicolons. all I have is 5 lines all beginning with %systemroot%.
    How do you add new subdirs to the path?
    Select the 'Path' variable and click 'Edit'. In the 'Edit environment variable' window click the 'New' button. Then you'll be able to type the path you want to add in the next line.

    add dir to path-image.png
      My Computers


  3. Posts : 19
    win10 home
    Thread Starter
       #3

    ok, thanks
    does each subdir need its own line or can you still separate with semicolons?
      My Computer


  4. Posts : 31,220
    10 Home x64 (22H2) (10 Pro on 2nd pc)
       #4

    dblake2 said:
    ok, thanks
    does each subdir need its own line or can you still separate with semicolons?
    Put each one on its own separate line.
      My Computers


  5. Posts : 19
    win10 home
    Thread Starter
       #5

    I don't know what this thing wants with its two inputs 'variable name & variable value'.
    I just want to add a couple subdirs to the path as in C:\batch; C:\utils.
      My Computer


  6. Posts : 16,581
    Windows 10 Home x64 Version 22H2 Build 19045.3930
       #6

    You have clicked New in the wrong dialog.
    Select the System variables, Path variable, then
    select Edit, then
    select New i.e. a new entry in the list for the Path variable.

    CP, System, Advanced system settings, Environmental variables, System variables, Path, Edit
    add dir to path-cp-system-advanced-system-settings-environmental-variables-system-variables-path-edit.png

    then
    CP, System, Advanced system settings, Environmental variables, System variables, Path, Edit, New
    add dir to path-cp-system-advanced-system-settings-environmental-variables-system-variables-path-edit.png


    What you were doing before was trying to create a new variable instead of editing an existing one.


    All the best,
    Denis
    Last edited by Try3; 02 Mar 2023 at 01:47.
      My Computer


  7. Posts : 6,196
    Windows 11 Pro - Windows 7 HP - Lubuntu
       #7

    You can modify or add the path on a CMD window

    D:\Users\Luiz>path /?
    Displays or sets a search path for executable files.

    PATH [[drive:]path[;...][;%PATH%]
    PATH ;

    Type PATH ; to clear all search-path settings and direct cmd.exe to search only in the current directory.
    Type PATH without parameters to display the current path.
    Including %PATH% in the new path setting causes the old path to be appended to the new setting.
      My Computers


  8. Posts : 19
    win10 home
    Thread Starter
       #8

    thanks Denis. I was off by a couple of keystrokes.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 13:17.
Find Us




Windows 10 Forums