Here is how we can create an environment variables that will be scoped to a specific block in a batch file:Example:
@echo Off
SETLOCAL
SET A="test"
echo %A%
ENDLOCAL
echo %A%
The word "test" is printed once.
Tags
command line
Here is how we can create an environment variables that will be scoped to a specific block in a batch file: