Creating a list of folders in the selected Finder Folder

Hello all. THis was asked before and I am sure there is an easier way to do this without applescript using KM11.

I want to select a folder in Finder. I want to trigger an MK macro that creates a list of folders in this selected folder. How can I do that?

This will display the subfolders in the selected folder. If you want to include all the child folders, change the first action from alphabetical to recursive.

Display List of Subfolders in Selected Folder.kmmacros (4.0 KB)

If you want the folder names without the full path, you could add a Split Path action before the Apened Variable action to capture the base name from the full path to a different variable (Local__FolderName):

3 Likes

Thank for the response and creating the macro. My apologies, I think I described what I want to do incorrectly.
I want to select a folder. In the selected folder I want to create ie, 3 folders (when I said list, that was unclear)
Folder 1
Folder 2
Folder 3

Hope this makes sense. What I am trying to do is to create a folder structure as a template for each new client. Each new client folder has a set of predetermined list of folders. (ie, accounting, correspondence, photos, videos, invoices. etc,).

Thanks again

I have a macro for you that I've used for many years:

Download Macro(s): Create sequential (numerical) empty folders.kmmacros (7.8 KB)

Macro-Image

Macro-Notes
  • Macros are always disabled when imported into the Keyboard Maestro Editor.
    • The user must ensure the macro is enabled.
    • The user must also ensure the macro's parent macro-group is enabled.
System Information
  • macOS 13.6.1
  • Keyboard Maestro v11.0.2

Navigate to the folder using Finder then trigger the macro.

With an input like this:

image

The macro would create folders like this:

image

I forgot that this macro also need another sub macro as follows:

Download Macro(s): [LIB]_PadAtFront.kmmacros (8.5 KB)

Macro-Image

Keyboard Maestro Export

Macro-Notes
  • Macros are always disabled when imported into the Keyboard Maestro Editor.
    • The user must ensure the macro is enabled.
    • The user must also ensure the macro's parent macro-group is enabled.
System Information
  • macOS 13.6.1
  • Keyboard Maestro v11.0.2

EDIT: since I created these macros years ago I probably would not write them like this now, but -hey - they work :wink:

1 Like

This is what it sounds like you want:
Make Folders in Selected Folder.kmmacros (2.9 KB)

Make Folders in Selected Folder

2 Likes

Thats exactly what I was trying to accomplish. Thank you kcwhat and all responded.

MK