title: block code in batch file
body: <p>I don't understand what's the problem with the syntax of this script:</p>
  
  <pre><code>@echo off
  set a=1
  set b=2
  cd d:\
  if %a% equ 1 (
    set a=%b%
    set b=5
    echo in a: %a%
    echo in b: %b%
    )
  echo out a: %a%
  echo out b: %b%
  pause
  exit /b
  </code></pre>
  
  <p>I get this result:</p>
  
  <pre><code>in a: 1
  in b: 2
  out a: 2
  out a: 5
  </code></pre>
  
  <p>I would like to get the following result:</p>
  
  <pre><code>in a: 2  
  in b: 5
  out a: 2
  out a: 5
  </code></pre>