Jump to content

Create Folder Structure

Recommended Posts

Create Folder Structure



This script creates a folder structure defined in a text file.





Select the definition text file, then open Alfred, and run “Create Folder Structure”.


Definition File Syntax


Create an UTF-8 encoded text file (e.g. in TextEdit), and start typing folder names, row by row, one after another. Each one must be placed in a unique row. If a subfolder is required, just indent it with a tab. Folder names can contain any legal characters the OS X supports.




First Folder

  Second Folder

    First Subfolder of Second Folder

    Second Subfolder of Second Folder

      First Subsubfolder of Second Subfolder

Third Folder




%date% - Creates a folder named after the current date.





You can download it from this link.





Feel free to contact me at

Edited by royaljerry

Share this post

Link to post

Unfortunately the script generates each folder wth a trailing new line – I’ll fix it today later.


Just edited, it should now work. :)

Edited by royaljerry

Share this post

Link to post

Seems the link is dead now. Was this submitted somewhere else? It's quite a handy looking tool!


Ugh, sorry. Link just updated (and re-checked), thanks for mentioning. :)

Edited by royaljerry

Share this post

Link to post

I've installed the Workflow and created a .txt document with my desired folder structure, however when I click on the file in the Finder and open Alfred to type "Create Folder Structure" into the Alfred modal all I get is this:




Steps to Reproduce:


1. Create file and save a file with the following:


     01 Discovery

     02 Findings & Recommendations

     03 Take Action

     04 Monitor & Analyze


2. Select the file (created in step 1) in the Finder

3. Invoke Alfred

4. Enter "Create Folder Structure" in Alfred

5. Nothing happens

Share this post

Link to post

Hi chsweb,


check this folder and simply follow follow these steps:

  1. Install the workflow you have downloaded (I assume you have already done this): cfs-1.png
  2. Check the workflow: cfs-2.png and cfs-3.png
  3. Create a textfile (my-folder-structure.txt, name doesn’ matter) with e.g. the following content (whitespaces are visible here because they are important): cfs-4.png
  4. Now run the workflow on this file (i.e. this is a file action): cfs-0.png
  5. Then press enter. :)

I hope this helps. Feel free to contact me by mail: royaljerry@gmail.com.





Share this post

Link to post

This is a file action, i.e. you not simply type into Alfred. Instead, you select the creator textfile (which contains the folder structure), and apply the workflow on it. (As if you applied an “Open Terminal Here” on a folder.)

To achieve this, select the textfile, and invoke the file action shortcut, which is, by default,


More info here:


I have just updated and annotated the video to avoid the blur-bug of Dropbox-movies.


Hope, this helps.





Edited by royaljerry

Share this post

Link to post

In case somebody else ends up on this thread, I fixed my problem by changing the "File Selection" Keyboard Shortcut in Alfred's Preferences > Features > File Search: Actions



Share this post

Link to post

Love the workflow.


However, what is the best way to be able put a parameter in as well.


So for example, in my text file i want to have something like below, where I can enter Wedding Date and Client Name myself. An example would be appreciated.


%Wedding Date% - %ClientName%


            High Resolution

            Low Resolution



Share this post

Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...