title: How do I export notes from Evernote using AppleScript?
body: <p>I'm trying to export notes from Evernote v.3.3.0 in HTML format to a location on disk using AppleScript. The task at hand doesn't seem to be particularly complicated, but my being relatively new to Evernote, and completely new to AppleScript doesn't help much... ;)</p>
  
  <p>Here's what I have come up with so far - any comments are much appreciated!</p>
  
  <pre><code>tell application "Evernote"
      set allmynotes to find notes
      set outputpath to "/Users/{myusername}/Desktop/Test"
      export allmynotes to outputpath format HTML
  end tell
  </code></pre>
  
  <p>From what I understand, exporting as HTML creates a single file per note, which is why I assumed I needed to specify an output <em>folder</em> name instead of an output <em>file</em> name. Another assumption is the fact that the script, when double-clicked, will run with the credentials of the active user; on my machine, this user has sufficient permissions to write to the specified folder.</p>
  
  <p>Results until now are <code>Evernote got an error: Unable to remove existing output file." number 1</code> and <code>Evernote got an error: Unable to create output directory.</code>. Any ideas?</p>
  
  <p>Many thanks in advance! :)</p>