Date Sensitive File Importer
Takes a folder full of files and creates Evernote entries. It will make a new notebook named after the containing folder and the new notes are titled with their file name. The new notes use the “date created” and “date modified” as their “created” and “updated” dates.
I took the bulk of the script from an old post here and updated it to recognize the date modified field, for those of us who are particular about that sort of thing.
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)
set currentFileDate to (the creation date of currentFile)
set modFileDate to (the modification date of currentFile)
set currentFileLocation to currentFile as alias
set currentFileFolder to (the name of theFolder)
tell application "Evernote"
set theItem to create note title currentFileName created currentFileDate notebook currentFileFolder from file currentFileLocation
set (modification date of theItem) to modFileDate
New To AppleScript?
- Here's how to use the AppleScripts you find here and -- to make them even easier to use -- here's how run them with simple keyboard shortcuts!
- Be sure to check out other great AppleScripts in the Veritrope.com Code Library -- and share your own AppleScript projects using the quick submission form!