I've made a minor adjustment to this code, it preserves folders and account by making a new notebook for each folder (within an account) and tags the account the note is associated with. This can be easily switched if you prefer your notebooks to be based on accounts and tagged with the folders.
tell application "Notes"
set theMessages to every note
repeat with thisMessage in theMessages
set myTitle to the name of thisMessage
set myText to the body of thisMessage
set myCreateDate to the creation date of thisMessage
set myModDate to the modification date of thisMessage
set thisItem to thisMessage
set myAccount to null
set myFolder to null
repeat
set thisContainer to the container of thisItem
if (the class of thisContainer) is folder then
set myFolder to name of thisContainer
else if (the class of thisContainer) is account then
set myAccount to name of thisContainer
end if
if myFolder is not null and myAccount is not null then
exit repeat
else
set thisItem to thisContainer
end if
end repeat
tell application "Evernote"
set myNote to create note with text myTitle title myTitle notebook myFolder tags myAccount
set the HTML content of myNote to myText
set the creation date of myNote to myCreateDate
set the modification date of myNote to myCreateDate
end tell
end repeat
end tell
if you want to make the notebook names from accounts and the tags from folders (opposite of what I have), you would change "set myNote to create note with text myTitle title myTitle notebook myFolder tags myAccount" to "set myNote to create note with text myTitle title myTitle notebook myAccount tags myFolder".