This script was originally published here as a downloadable app — publishing the source code here in the Code Library just in case anyone wants to modify it. Note — Evernote can import Text and RTF files natively and, generally speaking, the quality of their import process has been improving since this was first published. […]

(*
http://veritrope.com
Evernote Importer: TXT OR RTF FILE
Version 1.03
May 26, 2010

Project Status, Latest Updates, and Comments Collected at:
http://veritrope.com/tips/evernote-importer-txt-or-rtf-files
           
Installation: Just double-click on the script!

FastScripts Installation (Optional, but recommended):
--Download and Install FastScripts from http://www.red-sweater.com/fastscripts/index.html
--Copy script or an Alias to ~/Library/Scripts/Applications/Evernote
--Set up your keyboard shortcut

CHANGELOG:
1.03    TEMPORARY REMOVAL OF RTF/TXT VALIDATOR WHILE REWORKING CODE
1.02     BUG FIXES (UNDERLINING, GROWL APP)
1.01    ADDITIONAL TUNING
1.00    INITIAL RELEASE
*)


(*
======================================
//  PROPERTIES
======================================
*)

property isRunning : "false"
property theNum : "0"

(*
======================================
// CHECK FOR GROWL
======================================
*)

if appIsRunning("GrowlHelperApp") then
    set isRunning to true
    tell application "GrowlHelperApp"
        set allNotificationsList to {"Success Notification", "Failure Notification"}
        set enabledNotificationsList to {"Success Notification", "Failure Notification"}
        register as application ¬
            "Import to Evernote" all notifications allNotificationsList ¬
            default notifications enabledNotificationsList ¬
            icon of application "Evernote"
    end tell
end if

(*
======================================
// MAIN PROGRAM
======================================
*)

tell application "Finder"
    try
        set exportedFiles to (choose file with prompt "Choose RTF or TXT Files (Multiple Selections Allowed)" with multiple selections allowed)
       
        repeat with exportedFile in exportedFiles
            set thefileName to the name of exportedFile
            set filePOSIX to quoted form of (POSIX path of exportedFile)
            set preHTML to (do shell script "textutil  -convert html -stdout " & filePOSIX & "")
            set firstScrub to my replaceString(preHTML, "<br>", "")
            set secondScrub to my replaceString(firstScrub, "<p class=\"p1\">", "")
            set thirdScrub to my replaceString(secondScrub, "<p class=\"p2\">", "")
            set fourthScrub to my replaceString(thirdScrub, "<p class=\"p3\">", "")
            set fifthScrub to my replaceString(fourthScrub, "<p class=\"p4\">", "")
            set sixthScrub to my replaceString(fifthScrub, "<p class=\"p5\">", "")
            set seventhScrub to my replaceString(sixthScrub, "<span class=\"s1\">", "<u>")
            set eighthScrub to my replaceString(seventhScrub, "</span>", "</u>")
            set theHTML to my replaceString(eighthScrub, "</p>", "<br>")
            tell application "Evernote"
                set importedNote to (create note with html theHTML title thefileName)
                set theNum to theNum + 1
            end tell
        end repeat
        (*NOTIFICATIONS*)
        if isRunning is true then
            my GrowlNotify(theNum)
        end if
        set theNum to 0
        (* ERROR HANDLING *)
    on error errText number errNum
        if isRunning is true then
            if errNum is -128 then
                tell application "GrowlHelperApp" -- GROWL FAILURE FOR ERROR
                    notify with name ¬
                        "Failure Notification" title ¬
                        "User Cancelled" description ¬
                        "Failed to export!" application name "Import to Evernote"
                end tell
            else
                tell application "GrowlHelperApp" -- GROWL FAILURE FOR ERROR
                    notify with name ¬
                        "Failure Notification" title ¬
                        "Import Failure" description "Failed to export the item due to the following error:  " & errNum & " (" & errText & ¬
                        ")" application name "Import to Evernote"
                end tell
            end if
        else if isRunning is false then -- NON-GROWL ERROR MSG. FOR ERROR
            display dialog "Item Failed to Import: " & errNum & return & errText with icon 0
        end if
    end try
end tell


(*
======================================
// HANDLER SUBROUTINES
=======================================
*)


--APP DETECT
on appIsRunning(appName)
    tell application "System Events" to (name of processes) contains appName
end appIsRunning

--GROWL
on GrowlNotify(theNum)
    tell application "GrowlHelperApp" -- GROWL SUCCESS
        set Plural_Test to (theNum) as number
        if Plural_Test is greater than 1 then
            notify with name ¬
                "Success Notification" title ¬
                "Import Success" description "Successfully exported " & theNum & ¬
                " items to the default notebook in Evernote" application name ¬
                "Import to Evernote"
           
        else if Plural_Test is equal to 1 then
            notify with name ¬
                "Success Notification" title ¬
                "Import Success" description "Successfully exported " & theNum & ¬
                " item to the default notebook in Evernote" application name ¬
                "Import to Evernote"
        end if
    end tell
end GrowlNotify

--REPLACE SUBROUTINE
on replaceString(theString, theOriginalString, theNewString)
    set {od, AppleScript's text item delimiters} to {AppleScript's text item delimiters, theOriginalString}
    set theStringParts to text items of theString
    if (count of theStringParts) is greater than 1 then
        set theString to text item 1 of theStringParts as string
        repeat with eachPart in items 2 thru -1 of theStringParts
            set theString to theString & theNewString & eachPart as string
        end repeat
    end if
    set AppleScript's text item delimiters to od
    return theString
end replaceString

This script exports a rich text copy of selected Evernote items and saves them in RTFD format. It also leaves an HTML copy of the note (and its resources) inside a sub-folder named after the note (in case you find it useful!) Just highlight the notes you want to export in Evernote and then run […]

(*
http://veritrope.com
Export Selected Evernote Items as RTFD Files
Version 1.4
June 11, 2011

Project Status, Latest Updates, and Comments Collected at:
http://veritrope.com/code/export-selected-evernote-items-as-rtfd-files/
Installation: Just run the script!

FastScripts Installation (Optional, but recommended):
--Download and Install FastScripts from http://www.red-sweater.com/fastscripts/index.html
--Copy script or an Alias to ~/Library/Scripts/Applications/Evernote
--Set up your keyboard shortcut

CHANGELOG:
1.40     UPDATED TO MAKE RTF CREATION DATE MATCH EVERNOTE ITEM
1.30    UPDATED TO UTILIZE NEW EVERNOTE APPLESCRIPT SELECTION AVAILABILITY
1.20    UPDATED TO FIX A COSMETIC ISSUE, CHANGE PATH FOR RTFD FILES
1.10     UPDATED TO USE NATIVE HTML EXPORT, CREATE RTFD FILES
1.00    INITIAL RELEASE
*)


property clean_text : ""
property CleanTitle : ""
property theNum : "0"
property RTFPath : ""


(* CHECK FOR GROWL *)
tell application "System Events"
    set processnames to name of every process
end tell

if "GrowlHelperApp" is in processnames then
    tell application "GrowlHelperApp"
        set the allNotificationsList to {"Success Notification", "Failure Notification"}
        set the enabledNotificationsList to {"Success Notification", "Failure Notification"}
        register as application ¬
            "Evernote to RTFD" all notifications allNotificationsList ¬
            default notifications enabledNotificationsList ¬
            icon of application "Evernote"
    end tell
end if

(*MAIN PROGRAM *)

tell application "Evernote"
    try
        (*PICK THE NOTES FROM THE LIST *)
        set SelNotes to the selection
       
        if (SelNotes is not false) then
            (*PICK EXPORT DESTINATION*)
            set SaveLoc to choose folder with prompt "Choose The Destination Folder or Volume:" default location (path to desktop folder)
           
            (*DO THE CONVERSION*)
            my ENEXExport(SelNotes, SaveLoc)
           
            if "GrowlHelperApp" is in processnames then -- GROWL SUCCESS
                tell application "GrowlHelperApp"
                    notify with name ¬
                        "Success Notification" title ¬
                        "Successful Export to RTF!" description ¬
                        "Number of Notes Exported: " & theNum application name "Evernote to RTFD"
                end tell
            end if
        else
            if "GrowlHelperApp" is in processnames then
                tell application "GrowlHelperApp" -- GROWL FAILURE FOR NO SELECTION
                    notify with name ¬
                        "Failure Notification" title ¬
                        "Export Failure" description ¬
                        "No notes selected!" application name "Evernote to RTFD"
                end tell
            else if "GrowlHelperApp" is not in processnames then -- NON-GROWL ERROR MSG. FOR NO SELECTION
                display dialog "No headline or tab selected!" with icon 0
            end if
        end if
       
       
        (* ERROR HANDLING *)
    on error errText number errNum
        if "GrowlHelperApp" is in processnames then
            tell application "GrowlHelperApp" -- GROWL FAILURE FOR ERROR
                notify with name ¬
                    "Failure Notification" title ¬
                    "Import Failure" description "Export Failed due to the following error:  " & errText & return & return & "Note Name: " & CleanTitle ¬
                    application name "Evernote to RTFD"
            end tell
        else if "GrowlHelperApp" is not in processnames then -- NON-GROWL ERROR MSG. FOR ERROR
            display dialog "Item Failed to Import: " & errNum & return & errText with icon 0
        end if
    end try
end tell



(* SUBROUTINES *)
on ENEXExport(SelNotes, SaveLoc)
    (*FIND FOLDER FOR NOTE*)
    tell application "Evernote"
        set theNum to 0
        repeat with SelNote in SelNotes
            set noteToExport to (contents of SelNote)
            set NoteID to (local id of item 1 of noteToExport)
            set noteName to (title of item 1 of noteToExport)
            set EVnotebook to (name of notebook) of item 1 of noteToExport
           
            set noteCreation to (creation date of item 1 of noteToExport)
           
            (*PREPARE HTML FOLDER *)
            tell application "Finder"
                set SingQuote to "-e s/'//g"
                set CleanTitle to do shell script ("echo " & quoted form of noteName & "  | sed -e 's/:/ /g' -e 's/\"//g' -e 's/—/ /g' " & (quoted form of SingQuote)) --CLEAN OUT COLONS FOR FILE PATH (SOUNDS GROSSER THAN IT IS)
                set ArchiveInput to ((SaveLoc as Unicode text) & CleanTitle)
               
                (*NEW HTML EXPORT *)
                tell application "Evernote"
                    export {noteToExport} ¬
                        to ArchiveInput ¬
                        format HTML
                end tell
               
                tell application "Finder"
                    (*LOOK FOR RESOURCE FOLDER *)
                    try
                        set EVNote to (every file of folder ArchiveInput whose ¬
                            name extension is "html")
                        set name of (item 1 of EVNote) to (CleanTitle & ".html")
                    end try
                end tell
               
                (*PREPARE FILENAME *)
                set InputFile to ("" & SaveLoc & CleanTitle & ":" & CleanTitle & ".html") as string
                set ImportPOSIX to (quoted form of (POSIX path of InputFile))
                set SaveRTFLocation to ("" & SaveLoc & CleanTitle & ".rtfd") as string
                set RTFPath to (quoted form of (POSIX path of SaveRTFLocation))
               
                (*CONVERT THE FILE*)
                set clean_text to do shell script ("textutil  -convert rtfd -output " & RTFPath & " " & ImportPOSIX & "")
                set fileCreated to my dateUSToUnix(noteCreation)
                do shell script "touch -t " & fileCreated & " " & RTFPath
            end tell
            set theNum to theNum + 1
        end repeat
    end tell
end ENEXExport

--CONVERT CREATION DATE TO UNIX FORMAT
on dateUSToUnix(noteCreation)
    set y to (year of noteCreation)
    set mo to (month of noteCreation) * 1
    if mo < 10 then set mo to "0" & mo
    set d to (day of noteCreation)
    if d < 10 then set d to "0" & d
    set h to (hours of noteCreation)
    if h < 10 then set h to "0" & h
    set m to (minutes of noteCreation)
    if m < 10 then set m to "0" & m
    set s to (seconds of noteCreation)
    if s < 10 then set s to "0" & s
    return (y & mo & d & h & m & "." & s) as string
end dateUSToUnix