title: batch files: show all hidden files; define if a file has an attribute or not
body: <p>I am trying to make a program which allows user to add/remove hidden or read-only attributes to a file and to see all hidden files in a directory. Now, i have two questions:</p>
  
  <ol>
  <li><p>How to define wether a file already has an attribute or not? I tried something like this:</p>
  
  <p>IF EXIST %file% /A:H GOTO ....</p></li>
  </ol>
  
  <p>(i want to know if a file already has an attribute of "hidden")
  but it doesn't work.</p>
  
  <ol>
  <li><p>How to find out if there at least one hidden file in a directory? I tried this:</p>
  
  <p>IF EXIST <em>.</em> /A:H-D-S GOTO ...</p></li>
  </ol>
  
  <p>(a file that is hidden, not a directory and not a system file)</p>
  
  <p>Can somebody help me? Thanks.</p>