Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- PURPOSE: Export all notes in Evernote to an ENEX file so that
- -- the notes can be backed up to an external drive or to the cloud
- -- Change the path below to the location you want the notes to be exported
- set filename to (do shell script "date '+%Y-%m-%d-%H.%M.%S'") & (".export.enex")
- -- Get the path the Application Support and then append the backup folder
- set e to path to application support from user domain
- set p to POSIX path of e & "Evernote-Backups/"
- -- If the folder is not there, make it for the user, this fails gracefully
- -- if the folder is there
- do shell script "mkdir -p " & (quoted form of p)
- set f to (p & filename)
- display dialog f
- -- Iterate through all your records and export them
- with timeout of (30 * 60) seconds
- tell application "Evernote"
- -- Set date to 1990 so it finds all notes
- set matches to (find notes "created:19900101")
- -- export to file set above
- export matches to f
- end tell
- end timeout
- -- Compress the file so that there is less to backup to the cloud
- set p to POSIX path of f
- do shell script "/usr/bin/gzip " & (quoted form of p)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement