---
title: Planter for LaunchBar
date: 2012-12-09 12:39
slug: planter-for-launchbar
categories:
- Code
tags:
- launchbar
- productivity
- scripting
---

![Planter for LaunchBar](/uploads/2012/12/planterlaunchbar.jpg)

This is a version of [Planter][] (instant nested folder creation from indented text input) modified for LaunchBar[^poritsky]. It has a customized version of the Planter script and CocoaDialog embedded, so you can use it simply by unzipping the download, placing the `.scptd` file in `~/Library/Application Support/LaunchBar/Actions` and running it directly from LaunchBar. Download at the end of this post.

If you use LaunchBar's "Instant Send" feature or navigate to a folder, hitting tab and running the Planter action will automatically use that folder as the root. If you run Planter on its own, it will ask you to pick a root directory.

Next, it will show you any templates you have installed in `~/.planter`. See the [original post][planter] for more information on templates. If you choose "Custom" from this dialog, you'll get a text dialog where you can enter your own indented directory structure to create. Directories are entered as plain text, and indenting a line will make that directory a child of the previous indent level before it:

	top-level-folder
		second-level-folder
			third-level-folder
		second-level-folder-2
		etc.

**Note:** this version does not have a fallback if there are no templates installed. I should have, but I'm out of time to fix this right now. Therefore, you must have at least one `.tpl` file in `~/.planter`. Put whatever common folder structure you use into `default.tpl` or just create a blank file with a `.tpl` extension.

Lastly, it will ask you for any replacement variables for the template. These are entered separated by spaces. Multiple-word replacements should be quoted (e.g. `"client 1" "client 2"`).

Then, it instantly creates your nested structure with any variable replacements in the folder you chose. Boom.

The next step for Planter is to handle templated files. For example, entering index.html on an indented line below a folder name would create a skeleton html5 index file at that location. I plan to have any file in `~/.planter` with an extension other than `.tpl` serve as a file template, so entering a matching name and extension in the file structure will place a file instead of creating a directory. Coming eventually.

If anyone wants to modify this script to work with Alfred, et al, it shouldn't be terribly difficult. All dependencies are embedded in the script bundle.

Have fun. Be productive.

**[Download Planter for LaunchBar/CLI v1.3](https://brettterpstra.com/downloads/Planter1.3.zip)**

Instantly create nested directory structures from indented text

[More info](https://brettterpstra.com/projects/planter/)

[Your support is greatly appreciated!](https://brettterpstra.com/donate/?ppid=A9KK2MTU7QSJU)

[planter]: http://brettterpstra.com/planter-tree-planting-for-your-filesystem/

[^poritsky]: Chunks of the AppleScript borrowed from [Jonathan Poritsky](http://www.candlerblog.com/).

---

Brett is a writer and developer living in Minnesota, USA. You can follow him as ttscoff. This content is supported by readers like you. [More about Brett](https://brettterpstra.com/contact.md), including social links.

Copyright © 2026 Brett Terpstra. All rights reserved.
