A quick way to set up a series of nested directories (and a file in the final one)?

I have a number of macros that create files for certain tasks. I wanted to create a central/shared macro where you can pass in a path and filename and it will do that. I realise, though, that it's not quite as simple as I thought.

In my existing macros, I create a series of folders and then the file. For example, if I wanted a text file in a/b/c, I would:

Create folder a
Create folder b (inside newly created a)
Create folder c (inside newly created b)
Create file 'whatever.txt' (inside newly created c)

I can't just create file at a/b/c/whatever.txt

Is there a smarter way that I can do this without the repetition/nesting?

You can use the New Folder action (KM wiki: action:New Folder [Keyboard Maestro Wiki]) to create the nested folder structure for you by setting the Intermediate option in the gear menu.

You then have to separately create the file.

1 Like

Aha! Another little gem that I now know about :slight_smile: Thank you

1 Like