Sending all Files to your Evernote
Tuesday, May 1, 2012 at 07:17AM I tend to use my Desktop on my computer as a sort of scratch pad. Somewhere to throw things when I'm in the middle of it. I use Hazel to keep it nice and clean, but beyond that I am for things to only be there briefly.
In particular I often drop things there before then end up in Evernote - it is set as my default download location so anything I pull off the Internet or from e-mails ends up there. It is where documents from my scanner go. Some of these files will go into folders, but then I wanted a quick way to send what was left to Evernote. So I had a play with some AppleScript...
Well, with a little help from Google and Stack Overflow, I managed to write a script that sends all files on the Desktop to Evernote, then dumps the files into the Trash. I have it set up as an application so all I need to do is trigger LaunchBar, type "dte", and the files fly to where they are needed ("dte" is short for 'desktop to Evernote').
So how did I do this? First open the AppleScript Editor:

The paste in the following AppleScript:
tell application "System Events"
set desktopFiles to every disk item of (desktop folder of user domain) whose visible is true and class is file
end tell
repeat with aFile in desktopFiles as list
try
tell application "Evernote" to create note from file (aFile as alias) notebook "Auto Import"
tell application "System Events" to delete aFile
on error errorMessage
logerrorMessage
end try
end repeat
Now save the file as an Application by picking 'Save as…' from the File menu, then picking 'Application' from the drop down box in the dialog box. Make sure you save it to you Application folder (Macintosh HD->Applications) so we can find it later - I called mine "Desktop to Evernote".
Now go back into your Applications folder and drag the Desktop to Evernote into you dock and you are ready to go - just click on the icon and it will send the contents of you Desktop to Evernote. If you have LaunchBar then get it to refresh its index, and you can launch it with a couple of keystrokes.
Rich | Comments Off |
Mac,
Productivity 



