Jump to content
JMichaelTX

EN Mac Import Files Using AppleScript

Recommended Posts

Evernote Mac does NOT have a built-in file import feature like EN Win, but AppleScript allows us to build our own, and even make it better.  See:

JMichaelTX/Evernote Mac File Import.AppleScript (Github Gist)

I maintain all of my script in Gists, but if you have any comments, questions, issues, or suggestions, please post them here.

Example Results

EN-Import-File-Results.png.2fcf7075793cfe920298453002879d6d.png

Share this post


Link to post
On 10/12/2018 at 4:45 PM, JMichaelTX said:

Evernote Mac does NOT have a built-in file import feature like EN Win

The Mac version of import folder uses the folder services feature (Watch Folder); tied to a script, as per your example.
In addition to selecting files in Finder, use the handler code: 
on adding folder items to theAttachedFolder after receiving theNewItems

Files added to the folder trigger the script.  There's documentation at https://developer.apple.com/library/archive/documentation/LanguagesUtilities/Conceptual/MacAutomationScriptingGuide/WatchFolders.html

>>but AppleScript allows us to build our own, and even make it better.

I agree, using a script gives unlimited potential.
An example; my script parses a monthly bank .csv file into separate notes.
I don't have dialog for notebook/tags (I prefer to do this within Evernote),
but I have automatic tag assignment based on content.

 

Share this post


Link to post
14 hours ago, DTLow said:

Instead of selecting files in Finder, I use the code: 
on adding folder items to theAttachedFolder after receiving theNewItems

Files added to the folder trigger the script.

I used the drag/drop technique initially, but I now much prefer the more direct method of just selecting the file(s), and then triggering the script with a hot key (set using FastScripts).  I see no advantage to drag/drop.

Share this post


Link to post
3 minutes ago, DTLow said:

Drag and drop works.  I think import folders are also  important for files downloaded from the internet, or created by scanners.

Yes, but simply pressing a hot key is easier/faster.  I guess it depends on your workflow.  I almost never want to import a file that I just created.  I usually want to change the name and creation date and other stuff.  For those that want to auto-import new files, then a Watch Folder  would be useful.  No drag/drop needed for that use.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...