Date Sensitive File Importer
Description
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.
The Code
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)
end if
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
end tell
end repeat
end tell
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)
end if
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
end tell
end repeat
end tell
Quick Links
Want to open the script right away?
Click here to open it in your Script Editor
Click here to open it in your Script Editor
Using Snippets to manage your code?
Save this into Snippets
Save this into Snippets
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!


2 Responses to “Date Sensitive File Importer”
Adam, wonderful script.
Is there any way you can give us a choice of destination notebook? I frequently import large numbers of 2-5MB pdfs in big chunks. I would prefer to direct them to a non-synced folder just in case I don’t want them shared.
Your current script creates a new synced notebook. Once the script starts you can’t stop EN from uploading. The folder today was a 200MB lump of a thing – 200MB wasted from my monthly quota. Would like to get into a non-synced folder then transfer the docs I want.
Do-able?
Many thanks.
Steve J
Thank you, this helped a lot.