Jump to content

Oliver Stewart

Level 1
  • Posts

    1
  • Joined

  • Last visited

About Oliver Stewart

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Oliver Stewart's Achievements

0

Reputation

  1. I tried to run the script posted above (thanks, DTLow!) and was getting "operation not permitted" errors running it against Evernote from the App Store. It looks like there's a sandboxing issue in recent macOS versions such as Mojave where Evernote can't access the files you're asking it to write. I managed to get it to work by moving creation of the file objects outside the tell block. Here's my modified script: set pathList to {} set fileList to {} tell application "Evernote" set allNotebooks to every notebook repeat with currentNotebook in allNotebooks set notebookName to (the name of currentNotebook) set fileBackupenex to "/Users/oliver/Documents/Evernote/Evernote_Backup/Notebook-" & notebookName & ".enex" set fileBackupenex to POSIX path of fileBackupenex copy fileBackupenex to the end of pathList end repeat end tell repeat with filePath in pathList copy (POSIX file filePath) to the end of fileList end repeat tell application "Evernote" repeat with i from 1 to number of items in allNotebooks set destFile to (item i of fileList) set currentNotebook to (item i of allNotebooks) set theNotes to every note in notebook (the name of currentNotebook) if theNotes is not {} then try with timeout of (60 * 60) seconds export theNotes to destFile format ENEX with tags do shell script "/usr/bin/gzip -f " & quoted form of fileBackupenex end timeout on error errorMessage return errorMessage end try end if end repeat end tell
×
×
  • Create New...