开发者

Bat file includes

开发者 https://www.devze.com 2023-03-24 16:09 出处:网络
Can one bat file be included in another?I have variables set in one bat file and want to include the other commands by calling a second bat file.I know about the call command.Is the开发者_JAVA技巧re a

Can one bat file be included in another? I have variables set in one bat file and want to include the other commands by calling a second bat file. I know about the call command. Is the开发者_JAVA技巧re an include command that is saying execute the remainder of the bat file from what is contained in that second bat file?


If you have a file variablefile.bat along the lines of

set var1 = value
set var2 = value

then you can add the line

call variablefile.bat

to another file to import the variables. You can access the variables as usual.

0

精彩评论

暂无评论...
验证码 换一张
取 消