If you want to set up an auto-import folder for the Mac Evernote client, here's what you need to do:
- First up, you want to create the auto-import folder in the Finder. For this guide, we'll create a folder on the Desktop called "Evernote Auto-Import".
- The next step is to enable Folder Actions. Right click on the auto-import folder and choose "Enable Folder Actions":
- Now, we want to make a script. Create the script using Script Editor and save it in "Library/Scripts/Folder Action Scripts" Our script will look like this:
-- -- Folder Action script to add items to Evernote when they appear in a folder --
-- after clipping, we'll move files into here property done_foldername : "Clip Successful" -- if the clip fails, we'll move files into here property failed_foldername : "Clip Failed"
on adding folder items to this_folder after receiving these_items try -- iterate of files added repeat with i from 1 to number of items in these_items set this_item to item i of these_items tell application "Evernote" -- clip it! create note from file this_item title "Auto Import " & this_item end tell tell application "Finder" -- make sure our 'success' destination folder exists if not (exists folder done_foldername of this_folder) then make new folder at this_folder with properties {name:done_foldername} end if set done_folder to folder done_foldername of this_folder -- move the file we just clipped into our success folder move this_item to done_folder with replacing -- all done end tell end repeat on error e -- uh oh. bad things happened. tell application "Finder" -- make sure our 'failed' folder exists if not (exists folder failed_foldername of this_folder) then make new folder at this_folder with properties {name:failed_foldername} end if set failed_folder to folder failed_foldername of this_folder -- move the failed file into the failed folder move this_item to failed_folder with replacing -- display the error message display dialog e buttons {"Cancel"} default button 1 giving up after 120 end tell end try end adding folder items to
- Finally, link up the folder and the script by right-clicking on the auto-import folder and choosing "Attach a Folder Action..." from the menu:
Now choose the script we just created, and that's it! Yer ready to go. Drag an image or file into the folder to try it out. If the clip is successful, the file gets moved into a sub-folder called "Clip Successful", and if it fails, it goes into a sub-folder called "Clip Failed" and the Finder will display the error message.
Idea
geechorama 1
If you want to set up an auto-import folder for the Mac Evernote client, here's what you need to do:
- First up, you want to create the auto-import folder in the Finder. For this guide, we'll create a folder on the Desktop called "Evernote Auto-Import".
- The next step is to enable Folder Actions. Right click on the auto-import folder and choose "Enable Folder Actions":
- Now, we want to make a script. Create the script using Script Editor and save it in "Library/Scripts/Folder Action Scripts" Our script will look like this:
- Finally, link up the folder and the script by right-clicking on the auto-import folder and choosing "Attach a Folder Action..." from the menu:
Now choose the script we just created, and that's it! Yer ready to go. Drag an image or file into the folder to try it out. If the clip is successful, the file gets moved into a sub-folder called "Clip Successful", and if it fails, it goes into a sub-folder called "Clip Failed" and the Finder will display the error message.
63 replies to this idea
Recommended Posts
Archived
This topic is now archived and is closed to further replies.