title: How to get a directory listing from a CLIPS program
body: <p>I am trying to find a way to get a directory listing from a running CLIPS program. The end goal is to have my CLIPS program run, find a set of files of facts to load into CLIPS, and then to run my rules. </p>
  
  <p>According to <a href="http://www2.cs.siu.edu/~rahimi/cs537/slides/big-2.pdf" rel="nofollow noreferrer">http://www2.cs.siu.edu/~rahimi/cs537/slides/big-2.pdf</a>, I tried </p>
  
  <pre><code>(defrule list-the-directory 
  =&gt;
    (printout t (system “ls ” “*.txt”) crlf)
  )
  </code></pre>
  
  <p>That function call completed without an exception but returned nothing. </p>
  
  <p>Oh, I am running CLIPS 6.3 on Mac OS X. </p>
  
  <p>Thanks in advance for any help. </p>
  
  <p>Bernie </p>