Batch (Windows) set variable to first argument doesn't work
<p>I have a batchscript mybatch in which I try to store the first user argument in a variable called FILE</p>

<pre><code>set FILE = %1 
if defined FILE (
  echo defined
  echo do something with %1
  ) else (
   echo not defined %1 
  )
</code></pre>

<p>If I execute my batch via mybatch test1 I get always not defined test1. Why is variable FILE not defined?</p>