Hi Brian! I don’t use either of those applications (yet), but it seems like it would be pretty easy to have one of them do a simple regex matching on the file then, use the matches to rename it. For example:
If you’ve named all your files using the convention you mentioned (description of my file-YYYY-MM-DD.ext) and it’s always 4 digit year, hyphen, 2 digit month, hyphen, 2 digit day, dot extension then you could use something like this regular expression below. However, if you use hyphens between words in your description, then things change a bit. For now, I’m going to assume you don’t.
(.*)(\-)(\d{4}-\d{2}-\d{2})(\..*)
Now, I use group matching because I find it really easy to work with when excluding certain things. There are other regex savants out there that can probably write something more fitting for this scenario, but this is what I came up with and what I would probably do.
Let’s break it down by the groups (notated by the characters in parentheses):
File Name: description of my file-2018-10-15.ext
Group 1 (.*)
We’ll call this the description match
This will match anything until it encounters the next group. So, in this case it finds everything before the first hyphen: “description of my file”
Group 2 (\-)
This is a throw-away group and we won’t use it
This will find the first hyphen after group 1’s match up until it encounters the next group: “-”
Group 3 (\d{4}-\d{2}-\d{2})
This is the date match
This finds your date by looking for exactly 4 digits, a hyphen, exactly 2 digits, hyphen, exactly 2 digits: “2018-10-15”
Group 4 Not sure if you need this, but it’s the extension match
After all that group matching up there, we’re left with only 1 thing. The extension (includes the dot): “.ext”
If Hazel or KM uses zero based regex, then your grouping would obviously start at 0 and you’d skip the 1st group instead of the 2nd group.
I really hope this helps you. Please feel free to ask any questions you’d like. But, my guess is someone is going to chime in and say "Oh, Hazel/KM can do that very easily by just clicking here, or rubbing that magic lamp there (as is the case usually from what I hear).
Cheers.