title: batch file (windows cmd.exe) test if a directory is a link (symlink)
body: <p>I learned just now that this is a way to test in a batch file if a file is a link:</p>
  
  <pre><code>dir %filename% |  find "&lt;SYMLINK&gt;" &amp;&amp; (
     do stuff
  )
  </code></pre>
  
  <p>How can I do a similar trick for testing if a directory is a symlink.   It doesn't work to just replace <code>&lt;SYMLINK&gt;</code> with <code>&lt;SYMLINKD&gt;</code>, because <code>dir %directoryname%</code> lists the contents of the directory, not the directory itself.</p>
  
  <p>It seems like I need some way to ask dir to tell me about the directory in the way that it would if I asked in the parent directory.   (Like <code>ls -d</code> does in unix).</p>
  
  <p>Or any other way of testing if a directory is a symlink?</p>
  
  <p>Thanks! </p>