title: How to test if a file is a directory in a batch script?
body: <p>Is there any way to find out if a file is a directory?</p>
  
  <p>I have the file name in a variable. In Perl I can do this:</p>
  
  <pre><code>if(-d $var) { print "it's a directory\n" }
  </code></pre>