Sunday, January 29, 2012

Evernote Watched Folder on Mac Snow Leopard

Maybe you're a PC going Mac, or just a Mac looking to save a few clicks, but in either case you could reasonably expect this PC-only feature of Evernote to be available on Snow Leopard: watched folders. Basically, this ensures that most documents put into a particular folder find their way into a new note in Evernote. This is useful is you want to save PDFs, for example, that are not clipped in the way standard HTML pages are when using the Evernote Web Clipper plug-in for your favorite browser.



To add this feature to Evernote, we can use it's AppleScript interface through a Folder Action we will create in Automator.



  1. Start Automator

  2. Create a new Folder Action

  3. Select the folder you want

  4. Add a Run AppleScript task to the workflow

  5. Add the following code to the task:

    on run {input}
    tell application "Evernote"
    repeat with x in input
    try
    create note from file x notebook "Auto Import"
    on error error_message number error_number
    display alert "Send to Evernote Failed" message "Error: " & error_message & " " & "Error Number: " & error_number as warning
    end try
    end repeat
    end tell
    end run


  6. Save it (File->Save a version)

  7. Navigate to the folder in finder and ensure that there is a folder action assigned

  8. Add a Notebook to Evernote called "Auto Import"; this step is optional, but you must remove the 'notebook "Auto Import"' from the code. If you do remove it, the note will be added to your default notebook.

  9. Save files to the folder

3 comments:

  1. Thanks for the killer tip. It helped me get around the problem in Mountain Lion where I cannot Scan To an application with Image Capture.

    ReplyDelete
  2. Great idea...one Q tho = how do you delete the items from the folder once you put them there? I did a Test with an item, I moved it into the folder and it went into a new note in my default notebook but it still is in the folderactions folder....I know I can just delete them but is there some way to do that within the script or Automator action? Thanks much.

    ReplyDelete
  3. Thanks for this script. Works wonderfully as written except for one thing: I have Evernote Helper running, but unless the Evernote application is running before I put a file in the watch folder, the file doesn't sync. In other words, if Evernote is not running, the first file I put in the folder opens Evernote but doesn't show in Evernote. The second file I put in does sync.

    ReplyDelete