Seeking workaround for minor "date" placeholder issue

Hi all,

I’ve been experimenting with smart rules and date placeholders, and they are so powerful.

I am hoping someone might have a workaround for this small issue…

When naming almost any of my files that I want to have a date in the title for, I use the number format YYMMDD.

I was able to create a smart rule that adds the date in the title for me using placeholders, BUT the closest format I could build was with the placeholders [YYYY][MM][DD] – so today, it would show up as 20220523. But I want it to show up as 220523.

Small difference, but finding out how to do this would save me from having to rename all of my other files that I named prior to using DEVONthink. I COULD just do 22[Month][Day] – but then I would have to update my rules every year lol.

Any ideas appreciated.

  • JC

It would be helpful if you could post one of your rules, please.

Ah yes, attached.

Amex Payment

I’m curious why you use the entire Amex Platinum Payment in the name.

  • Do you have multiple Amex cards?
  • Are you filing things other than payments?

My solution is an Applescript

Yes, 2 different Amex cards, and no, not filing anything other than payments in this group.

I used Amex Platinum Payment in the name just because that’s what I had used in the Finder for years, and now that I’ve imported everything into DT, I just continued with that same naming convention.

Thanks DTLow. Sounds like learning Applescript will solve a lot of the issues I am running into, which I have been wading into, although I’m still at an early stage in learning.

Do you have a brief overview of how to pull that off? Even just pointing in the right direction, and I can go research the specifics.

There isn’t any complication I’m seeing. Just thinking about being more succinct in the filenaming.

Have you considered using a group for each card and using the group name in the Change Name action?

I have the smart rule targeting a _Bills group. So a file clipped into a group named Amex Platinum would be named Amex Platinum_PAID_05232022 in this instance.

Also, how many files with the YY format do you suspect you have. I’d personally suggest opting to rename those and use the YYYY format for the sake of ease in future naming.

You’re already using Smart Rules so specify script execution as an action
Screen Shot 2022-05-23 at 21.39.30

This provides skeleton script code

And here’s sample code

       set theName to name without extension of theRecord
       set theName to texts 20 thru -1 of theName
       set name of theRecord to theName