0

So I'm not sure exactly what this command is doing - it looks like it was set up edit the path variable.

I need to run it for a class. Unfortunately it's not well documented so I want to make sure: will this mess up my PATH variable? If so, how do I backup my PATH variable first? (My OS is windows 10.)

rem myauto for java

path=.;c:\;"c:\Program Files\Java\jdk1.8.0_66\bin";c:\javaHW
set classpath=.;c:/;"c:\Program Files\Java\jdk1.8._66\bin\lib";c:\javaJW
Psycogeek
  • 9,139
dluxcru
  • 375

1 Answers1

1

There is no real need to back up PATH: restarting cmd will restore it, along with any other variables which have been set or changed by other files in the application suite.

If you don't want to do this, you can simply save PATH in another variable:

savepath=%path%

You can equally simply restore it with:

set path=%savepath%

or, more simply (a blank or equals sign can be used after path):

path %savepath%

Of course, other variables will not be reset.

AFH
  • 17,958