title: Windows 7 batch files: How to check if parameter has been passed to batch file
body: <p>Back in the mid-90's, I remember doing something like this:</p>
  
  <pre><code>if %1==. dir
  </code></pre>
  
  <p>basically, if you put the above code in <code>dodir.bat</code> and run it on its own without passing it any parameters, it would run the dir command.  However, if you passed it anything at all as a parameter, it would not run the dir command.</p>
  
  <p>I can't seem to get this to work in my Windows 7 batch files.  Perhaps I don't remember the proper syntax.  Any helpers?</p>