Create folders with names based on prompts

Hi, before i ask the question i’d like to state that I’m new to KBM and don’t know any apple script or other programming language. When i bought KBM i was hoping to be able to accomplish the following without having to do any applescript.

Job Name: XYZ
Every job i work on gets a folder inside my main “WIP” folder.

The way i’m currently naming my sub folders inside the job folder XYZ, is by using the model number of the item i’m working on (In this example XYZ) followed by standardized text. I Typically create 4 folders:


So what i’d like to accomplish is the following:

Step 1:
create a new job folder manually inside my WIP folder. No need for KBM.

Step 2:
I’d like KBM to prompt me for the job name (in this case XYZ) and then create the 4 folders inside the folder i’m currently in (in this case ~/WIP/XYZ) and use the prompted job name followed by the standardized naming as shown:


I can’t even figuring out how to tell KMB my current finder location to ask it to create folders in this current location.

Any help is greatly appreciated.

To get good answers here, it’s always a good idea to post…

What do I want to achieve
What I have done (+ downloadable macro + macro screenshot)
What is exactly the problem
System version, KM version, other infos

I'm on KBM 7.

Here's how far i've gotten. Prompt user for the model number which is used to name the 4 folders i'd like to create inside the current folder i am in. So after i would be prompted, and enter "XYZ", i'd like it to then create the following:


I don't know how to use the user input to name the folders and to tell KBM where to create those folders (in my case, in the current location in the finder window.


Hello 305kbm -

Interesting question.
I tried your macro above -- "Create New Folder" didn't work here either.
So, here is a work-around that does work ... not so elegant, but it works, and no Apple Scripting.

1) Starting with the folder you created manually:


2) KM produced these subfolders -- is that what you want to see?


3) Using this macro (shown here in "folded" view):


Does this do what you want?
If so, I can send you the expanded/un-folded macro with complete details:
Either as several screen prints or a KM file that you can import.

In general, the Create New Folder action only works if the containing folder already exists. If you have to create intermediate folders you have to use a little bash script with mkdir -p.

@Mark that looks great. If you could send the script that would be great.

I do have 2 questions:

After you insert the text of the folder by pasting, don’t you have to prompt it to hit “return” before “selecting new folder” again?

I’m not following the “trigger” in the beginning of your macro? Can you explain? The one i chose was a text string but i’m trying to understand the one you chose.

Thanks a lot, this is greatly appreciated.

@Tom can you elaborate on what you mean with “intermediate folders”?

If you have folder…


you can use the Create Folder action to create folder /A/B.

However you cannot use it to create folder /A/B/C — if the “intermediate” folder B/ doesn’t already exist.

In such cases you have to run mkdir -p /A/B/C

@tom, if you create /A/B first by using “Create folder” can you then add another line in the macro following it by another “create folder” to create /A/B/C ?

Yes. If /A/B exists you can create /A/B/C with the Create Folder action. (But not /A/B/C/D, unless you have created before folder C/ too).

@tom understood. Thank you for explaining.

@Mark please post the KM file or screen prints, it would be greatly appreciated. Thank you.

[quote=“305kbm, post:6, topic:5186, full:true”]
1)After you insert the text of the folder by pasting, don’t you have to prompt it to hit “return” before “selecting new folder” again?[/quote]

If I understand your question, the KM action “Prompt for User Input” has a button for that.

Good question.
Normally I put a lot of thought into selecting triggers, but this is just a “first draft” so I used status menu trigger; simple and easy.

I assume you will use this macro perhaps a few times a week, not many times per day.
Is that correct?
If so, a convenient way to “pull the trigger” is KM status menu, in the menu bar (top, right of the Mac screen).
A pallet is another option, but, as a newcomer to KM, better to keep it simple now.

Sending to you by email is most convenient for me.

You can share a macro to the forum using the Share button in Keyboard Maestro. See: