Tuesday Tip: Using the Folder Actions

Use folder actions to let folders spring to life

By using so-called folder actions you can add almost any functionality to folders including scripts that interact with DEVONthink Pro (Office). So, creating a ‘drop box’ folder that automagically imports all files that you drop into it, is easy:

  1. Create a folder on your Desktop and name it, e.g., ‘DEVONthink Inbox’
  2. Locate the DEVONthink Pro (Office) disk image and mount it
  3. Open the folder Extras/Scripts/Folder Actions
  4. Copy both scripts to your hard disk, ~/Library/Scripts/Folder Action Scripts/
  5. Select the folder in the Finder and choose ‘More > Enable Folder Actions’ from the contextual menu (if necessary)
  6. Attach the ‘Import Action.scpt’ script by choosing ‘More > Attach Folder Action’ and locating the script that you have copied to your hard disk

Drop or copy any file to the ‘DEVONthink Inbox’ hot folder that you have just created on your Desktop to immediately import it to the currently open DEVONthink Pro database.

You can check the Folder Actions that you have assigned by choosing ‘More > Configure Folder Actions’ from the contextual menu when you right- or Control-click a folder. If you are not fully satisfied with the way the scripts work, choose ‘More > Edit Folder Action >’ from the contextual menu and modify the script to your needs.

9 Responses to “Tuesday Tip: Using the Folder Actions”

  1. matt davis says:

    I tried this, and can’t get it to work. I also have Hazel instlled, though. Does that make a difference?

  2. Eric says:

    @matt: That could well me as Hazel automatically supervises folders and act on them. Maybe you could use Hazel to accomplish the same task: Open incoming files with DEVONthink which should import them?

  3. matt davis says:

    Yup. That works.

    But even better: I actually just realized I can get Hazel to run any Automator workflow, and the DT Pro Finder Plugin is really good for importing, since it prompts you to select the group at the time of import. So now I can point my scanner toward a given folder, and set that folder to open a given file type in a given program, and have DevonThink let me choose where to put the PDFs as they come in.

    It’s tools like these, that expose “plumbing” to the users disinclined to write shell scripts, that make OS X so fun to use.

  4. Rene Miller says:

    I tried this and could not get it to work. I do not have Hazel installed. Is there some other way to have a drop box on the desktop so things I want to keep can go into the inbox in my database?

  5. Eric says:

    @Rene: What you can also do is simply drop anything you want to store on DEVONthink’s icon in the Dock.

  6. Rene Miller says:

    Thanks. Is there someway for items to go directly into the Inbox folder I set up. When I drag items they get imported as stand alone documents, not in the folder. I want everything imported to go into the folder and then when I have time I will sort through them and put them into the appropriate place.

  7. Eric says:

    @Rene: Using this approach, no. For this you’d need to create an AppleScript and attach it to a folder. Alternatively you can, however, open the Tools > Groups panel and drag your files directly to the inbox there.

  8. Rene Miller says:

    Thank you.

  9. Christian Grunenberg says:

    Rene,

    you might have a look at these threads describing how to create folder actions or droplets using the “incoming group” (the one specified in the preferences):

    http://www.devon-technologies.com/scripts/userforum/viewtopic.php?f=20&t=4604
    http://www.devon-technologies.com/scripts/userforum/viewtopic.php?f=20&t=5651

Leave a Reply

Note: Blog comments are for commenting on a post. They are unsuitable for proper customer support, honestly. Please consider writing to our support team instead.