Created
April 29, 2012 08:10
-
-
Save matsubo/2543898 to your computer and use it in GitHub Desktop.
Import all the text file into evernote.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment