Skip to content

Instantly share code, notes, and snippets.

View mshk's full-sized avatar

Masahiko Tachizono mshk

View GitHub Profile
@mshk
mshk / gist:6276780
Last active December 21, 2015 08:18 — forked from matsubo/gist:2543898
Read files under the folder you choose and add them to Evernote as text note. Updated version of https://gist.github.com/matsubo/2543898 . Difference is that this script reads contents of the text files and set them as contents of newly created Evernote notes, instead of adding text files as attachments.
set listOfNames to {}
set theFolder to choose folder "Select the source folder"
tell application "Finder"
set filelist to every file of the folder theFolder
repeat with currentFile in filelist
set currentFileName to (the name of currentFile)
set nom to currentFileName
if text -4 of nom is "." then
set currentFileName to (text 1 thru -5 of nom)