- Get link
- X
- Other Apps
In this lesson, you will learn about variables. How to create them, modify them, and use them in your code. Variables are used to store strings of text. In batch, they are represented as the variable name, surrounded by percent symbols: %myVar%. To set a variable, use the set command like this: set abc=1234 echo %abc% This will create a variable called 'abc', that expands to the value '1234'. Then, the program will display the text '1234' through the echo command. set abc=12 echo %abc% set abc=34 echo %abc% This program will display the text '12', then on a separate line, '34'. You can also set the value of a variable to nul(nothing) like this: set var= This is different that setting the variable to 0 because this gives an output of nothing, not 0. Parameters...