Why does the following Windows Batch File output Foo followedby Bar, rather than Baz?
Foo
Bar
Baz
@echo off setlocal set _=Foo echo %
try this
@echo off setlocal set _=Foo echo %_% set _=Bar if "1" NEQ "2" goto end set _=Baz echo %_% :end