コード
@
ECHO OFF
ECHO ------------------------ begin
SET A=Hello
ECHO *101: A=%A%
ECHO ---------------------------- SETLOCAL
SETLOCAL
ECHO *201: A=%A%
SET A=World
ECHO *202: A=%A%
ENDLOCAL
ECHO ---------------------------- ENDLOCAL
ECHO *102: A=%A%
ECHO ------------------------ end