Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

running multiple commands in windows command line

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

like image 422
pseudo Avatar asked Aug 01 '12 14:08

pseudo


1 Answers

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.

like image 121
npocmaka Avatar answered Oct 14 '22 08:10

npocmaka