title: Filtering arguments in windows batch file
body: <p>Is it possible to filter list of arguments in windows batch file?</p>
  
  <p>Assuming it is called like:</p>
  
  <pre><code>file.cmd arg1 --unwanted arg3
  </code></pre>
  
  <p>It should call some other executable (hardcoded) without the argument string <code>--unwanted</code>:</p>
  
  <pre><code>some.exe arg1 arg3
  </code></pre>
  
  <p>I only know the name of the argument, it can be passed as any argument in the list. It may not exist on argument list, and the all arguments should be passed unmodified. Number of arguments may vary.</p>
  
  <p>More examples (what's called -> what should be called in result)</p>
  
  <pre><code>file.cmd arg1 arg2 -&gt; some.exe arg1 arg2
  file.cmd --unwanted -&gt; some.exe
  file.cmd --unwanted arg2 -&gt; some.exe arg2
  file.cmd arg1 --unwanted -&gt; some.exe arg1
  </code></pre>
  
  <p>Moving from unix shell scripting windows batch files are black magic to me :)</p>