Thursday, June 25, 2015

Pass variables from a .bat file to .cmd file.

If the .bat file holds:

./ExecuteStuff.cmd Foo Bar

 
 

...and ExecuteStuff.cmd sits in the same folder and has this in it at some point:

set Baz=%1
set Qux=%2

 
 

...then Foo will get mapped to Baz and and Bar will get mapped to Qux!

No comments:

Post a Comment