pseudo
pseudo

Reputation: 848

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

Upvotes: 9

Views: 9431

Answers (1)

npocmaka
npocmaka

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

Related Questions