Windows export PATH configuration

I have many variables in the PATH and I want to export and reuse them.

Is that possible? (something like a .reg file)

5

1 Answer

Nearly all languages support a way to access environmental variables already but you haven't asked for anything specific so we'll assume that you want to do this from the command line. Path is just one variable. At the command line type: echo %PATH% to see it's value.

If you want all of the environmental variables listed then type: SET by itself.

Type SET TMP=%PATH% to create a new copy for just this session.

Type SET PATH=%PATH%;C:\newdir to append to it.

To loop through %PATH% use this: for %a in ("%path:;=";"%") do @echo %~a

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like