Milind
Milind

Reputation: 493

Modifying the PATH environment variable for the session

I am trying to write a windows 10 batch file to modify the PATH variable for the current session only. I do the following:

SET PATH = "d:\A\B\C\D\E\";%PATH%
echo %PATH%

The echo of the path shows that the path variable is unchanged. How do I change the variable?

Thanks

Upvotes: 2

Views: 1590

Answers (1)

Stephan
Stephan

Reputation: 56208

check echo %path % - and then remove the spaces around the = in your set command. Those spaces are part of your variable name respective your value.

Upvotes: 3

Related Questions