Evernote: Importing multiple (batch import) exported (ENEX) notes

If you used Evernote‘s graphical interface, you might have noticed that you can only import a single note at once. In this article I am going to show you how to import multiple notes at once into Evernote.

Evernote ships with a command line tool that is suitable for scripting (ENScript). By default, on Windows, it is installed in: C:\Program Files (x86)\Evernote\Evernote\ENScript.exe

Open the command prompt and type:

CD /D "C:\Program Files (x86)\Evernote\Evernote"
ENScript.exe

This will display the help screen:

Usage: ENScript <command> [options]

Commands:

createNote - creates note from the specified file or url
importNotes - imports notes from the specified export file or url
showNotes - displays specified notes in the Evernote window
printNotes - prints specified notes from the Evernote window
exportNotes - exports specified notes into a file
createNotebook - creates a notebook
listNotebooks - lists specified notebooks to standard output
syncDatabase - synchronizes database to the service

Type "ENScript <command> /?" to get command specific help.

@filename - specifies response file name contaning options one per line.

Command line options that follow response file name specification override
options specified in the response file.

In this article we are going to focus on the “importNotes” command but first let’s see how to use it:

C:\Program Files (x86)\Evernote\Evernote>enscript importNotes /?

Usage: ENScript importNotes [options]

Options:

  /s {file|url} - source .enex file or url. If omitted, stdin is used to gather source specification.
  /n notebook - notebook to create the note in. If does not exist, lazy create. If omitted, use default notebook.
  /b notebook - business notebook to create the note in. If does not exist, lazy create.
  /u username - user name if not the same as database file name.
  /p password - user password to confirm Evernote service access.
  /d database - database file name if user name is not specified.

If both database file name and user name are not specified, last login name is used and
if there is none, USERNAME environment variable value is used as a user name.

Now assuming that your exported notes are in C:\EvernoteExports\*.ENEX and we want to import them into a notebook called “MyImportedNotes”,  then this is how one would think one can import all the notes:

enscript importNotes /s c:\EvernoteExports\*.enex /n MyImportedNotes

But this method will not work:

File does not exists: "c:\EvernoteExports\*.enex"

This is because “*.ENEX” is not a valid file name. What we need to do is import one file at a time:

enscript importNotes /s "c:\EvernoteExports\Moon photos.enex" /n MyImportedNotes

But…that becomes tedious. Can we import all files at once?

The answer is yes and with some Batchography scripting we can write a quick command line to iterate over each file and import it:

for %a in ("c:\EvernoteExports\*.enex") do  enscript importNotes /s "%a" /n MyImportedNotes

Voila! Now you have Batch imported all the notes in that folder!

Stay tuned for more Evernote automation notes!

You might also like:

One Reply to “Evernote: Importing multiple (batch import) exported (ENEX) notes”

  1. Hey, I love your input. Great!

    Can you help me with…I would like to import all files in a folder with various subfolders, subsubfolder etc.
    I would like to import all files in a folder with various subfolders, subdirectories, etc.
    How would I do that?

    for %a in (“c:\EvernoteExports\*\*.*”) do enscript importNotes /s “%a” /n MyImportedNotes ??

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.