title: Why do you need to change things in a batch file vs on the command line?
body: <p>When entering a command manually it works fine, but when using that same command in a batch file it errors out. HOW to fix it has already been answered <a href="https://stackoverflow.com/questions/21128185/run-cmd-command-work-but-run-from-batch-file-doesnt">here</a>, but I am wondering WHY you have to change things.</p>
  
  <p>The linked example is that when using a for statement in a batch file, the variables need two  percent (%) signs instead of one.</p>
  
  <p>On the cmd line:</p>
  
  <pre><code>for %f in folder move ...
  </code></pre>
  
  <p>From a batch file:</p>
  
  <pre><code>for %%f in folder move ...
  </code></pre>