title: Variable assignment in batch
body: <p>This question seems to be (very) stupid be I can't deal with it :(</p>
  
  <p>When I tried this batch code:</p>
  
  <pre><code>if "%1" == "-i" (
  set is = %2
  echo. %is%
  shift
  )
  </code></pre>
  
  <p>called with 2 (or more) arguments, it does NOT work. It actually prints a blank. The "shift" command is not done either. When I watch the executed code (without the @echo off at the beginning), I can see that the "set" command is completed.</p>
  
  <p>What's wrong with it?</p>
  
  <p>Example of calling:</p>
  
  <pre><code>c:\script.bat -i test -d bla
  </code></pre>