Reputation: 848
how can I run multiple commands at once from windows command line? In *nix environment I can do:
export VAR=foo; echo $VAR
The closest way I was able to find is this:
set VAR=foo & echo %VAR%
however when I "echo" the VAR is not set. I need all commands to be executed under the same process
Upvotes: 9
Views: 9431
Reputation: 57302
cmd /c call set VAR=foo & echo %VAR%
- this worked ok i.e. set is called with "call set"
.You can set call before each of the commands.
Upvotes: 11