Command SETLOCAL
Function:
Set the localisation of environment variables.
Syntax:
SETLOCAL
Note:
Changes to the current environment variables are un-done with the ENDLOCAL command.
Command SETLOCAL is cumulative, that is. when command SETLOCAL is used 5 times, then 5 ENDLOCAL commands are required to return to the original environment variables.
The original environment variables are not automatically restored when a batch file ends, the ENDLOCAL command is required.
Also see command ENDLOCAL and Batch Files.
