title: Batch export of org-mode files from the command line
body: <p>Assume that I have in a certain directory several <code>org-mode</code> files: <code>foo1.org</code>, <code>foo2.org</code>, etc. I would like to have a script (maybe a makefile) that I could invoke something like </p>
  
  <pre><code>$ generate-pdfs
  </code></pre>
  
  <p>and <code>foo1.pdf</code>, <code>foo2.pdf</code>, etc. will be generated.</p>
  
  <p>I thought that something like <code>emacs --batch --eval &lt;MAGIC&gt;</code> is a good start, but I don't know the magic.</p>
  
  <p>A solution that is solely <em>inside</em> emacs could be of interest as well.</p>