简体   繁体   中英

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

cmd /c call set VAR=foo & echo %VAR% - 这个工作正常,即使用“call set”调用set。你可以在每个命令之前设置调用。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM