Hi there! I just made the move over to Keyboard Maestro from QuicKeys and I have managed to re-do most of my scripts that I had working in QK apart from one for batch renaming files in a particular way.
The script I used to have would order the Finder selection by date created and add a prefix 01,02,03 etc. This was very useful and I would love to re-create it in KM.
I'm struggling as the rename files macro doesn't have the same amount of preset options available as QK..
Thanks for the quick response @tiffle I did find that one already but the bit i'm struggling with is to get the sequence to reflect the date created.. So prefix 01 is the file that was first created etc etc..
@tiffle aha I have found a very easy solution! If I sort the files in finder before running the Macro by date created then this happens automatically for me. Thanks again for your help!
An additional very useful feature to my Macro would be if it could check for a number prefix and delete it if it finds one.. I'm messing around with searching and replacing with regular expression, would be great to know if I'm barking up the right tree?
I don't test first when doing this sort of operation; I just run the regex and let it do its thing. If the prefix is there it will be deleted – if the prefix is NOT there the replace will fail silently.
Thanks for that @ccstone, being a total reg ex novice it would be great to be pointed in the right direction to achieve an expression to single out a three digit number and a space at the start of a string?
Great. Additionally, if you want to rename all the files in a folder (instead of just a few that you’ve selected) then the Folder Contents collection collection:Folder Contents [Keyboard Maestro Wiki] can be set to sort by create date so you don’t have to!
Anyway - glad it’s working and that @ccstone has given you the solution to your other request!
Thank you both @tiffle and @ccstone ! I have the Macro doing exactly what I want it to do and it's saved me loads of time already!
I have a feeling that i've only scratched the surface of this program and will benefit from taking a deeper dive at some point to see if I can automate some more boring repetitive stuff.
Thanks so much again for the solutions and also for getting back to me so quickly!