Create a dated folder in finder with an incrementing alphabetised suffix

A complete newbie here, and your collective wisdom would be most appreciated on what is probably a really simple question, but I haven't been able to find an answer for so far. I'd like to create a dated folder in finder, with an incrementing alphabetised suffix at the end of the name. For example "Invoices_240918_A", "Invoices_240918_B", etc. The idea being that when the date changes the suffix resets to A. I would never need more than 20 folders in any given day, so I wouldn't need to worry about what happened once I hit "Invoices_240918_Z"
Thanks so much for reading, and your advice is most appreciated.

Dated Invoices Folder Macro (v11.0.3)

Dated Invoices Folder.kmmacros (2.1 KB)

I have a slightly different macro that uses numbers to increment the folders. Have a look at the yellow actions:
Move sel file(s) to client subfolder; add new client if needed.kmmacros (11.0 KB)

Welcome -- and congrats on a well-crafted question.

This is, perhaps, the easiest way of doing things -- if there's anything that's not clear, ask.

Dated Suffixed Folders.kmmacros (5.7 KB)

Image

1 Like

Hi @Nige_S, bravo, this is absolutely perfect! Thank you so much for taking the time to reply and posting this macro, I really do appreciate it.

If you ever do run out of letters you can change the macro so there's a "For Each..." inside a "For Each...":

The "folder exists" and "create new folder" patterns are both
~/Desktop/OUTPUTS/Invoices_%ICUDateTime%yyMMdd%_%Variable%Local_s1%%Variable%Local_s2%

You'll have a decision to make at that point, since ..._AA would be created after, but listed alphabetically before, ..._B.

If you are happy with that then start Local_suffixes with a blank line and "Include blank lines" in the outer "For Each..." only. If you want to start out with ...AA, miss out the blank line or uncheck "Include...".

This loop-inside-a-loop works because, in a "For Each...", Collections are local to that "For Each..." and each Collection is iterated through independently, even when created from the same "thing". Just remember to use different variables, here Local_s1 and Local_s2, to hold "each item" in!

Thank you @Nige_S for taking the time to take this even further- that's amazing! Iā€™m just starting to get my head around this powerful piece of software, but having someone talk you through it, and its internal logic, helps so much. Thank you again!