Creating Incremental Lettered Folders

Hi everyone,

I share a server with several collaborators. Every time we do a task we have to create a lettered folder in a server directory (ex. server/from_staff/[date]221006/[lettered folder]C. My hope is to fire off a macro that will 1) create a new folder in this directory that is the next letter in the alphabet than the existing folders 2) copy my current folder into that directory.

Any suggestions on how to do this? Please keep in my - I'm relatively new to Keyboard Maestro, so when this switches to anything to variables/expressions, I need pretty detailed instructions. Sorry about that!

Thanks!
David

1 Like

Do you have a sample of a macro that you are working on to do that? Where are you getting stuck?

My approach would probably be to

  • manually select the previous folder in finder so that it is selected
  • trigger the macro
  • simulate a copy command to get the folder text into the clipboard
  • parse the clipboard text to extract the letter
  • generate new folder text based on the letter detected
  • simulate keystroke to create a new folder in the finder
  • paste the generated text
  • simulate return keystroke to finalize name of folder.

Just to clarify, since you’re asking a question I’ve recategorised your post.

In your example:

does [lettered folder] represent the incrementing letter? So the sequence would be AC, BC, CC and so on?

If so, what happens when ZC is reached?

1 Like

Continuing from @tiffle's question -- what format is the [date]?

Or combining our questions together, would today and tomorrow's sequence be:

server/from_staff/221006/A
server/from_staff/221006/B
server/from_staff/221006/C
server/from_staff/221007/A
server/from_staff/221007/B
server/from_staff/221007/C
...

...and your [...] is an explanation of type and is followed by example data?

And if so, similar question -- what happens when Z is reached?