Is there an equivalent source command in Windows CMD as in bash or tcsh?

mart2001 picture mart2001 · May 1, 2012 · Viewed 77.9k times · Source

I know that in the unix world, if you edit your .profile or .cshrc file, you can do a source ~/.profile or source ~/.cshrc to get the effect on your current session. If I changed something in the system variable on Windows, how can I have it effect the current command prompt session without exiting the command prompt session and opening another command prompt session?

Answer

Eike picture Eike · May 8, 2012

In the usual Windows command prompt (i.e. cmd.exe), just using call mybat.bat did what I wanted. I got all the environment variables it had set.