1. String interception function. %var:~start,length% , which means to intercept the length characters from the start position in the variable var. The following examples illustrate:
2. Print the value of the variable. echo %var%
3. Get the variable value, that is, sandwich it with two percent signs. %var%
4. Set the value of the variable. set command. You can also display the value of a variable, and you can also display the value of all environment variables.
Display the value of all environment variables: use set
Display the value of the specified variable: use set var
Clear variables: use set var=
Assign values to variables: use set var="value"
Clear the value of a variable: use set var=
1. String interception function.
1. String interception function.
1. String interception function.