How do I creat auto property from file name?

Hello guys.
I am noob, please help me.
I creat new file name with “Templater” Plug in

  1. Creat file name format “HTTT_**-MM-YYYY” and I typing ** as the Day I want.
  2. I want the property “Event Date” auto change, auto update when I change the Day.
    Example:
  • When I rename file to “HTTT_30-01-2001” . The property “Event Date” auto update to “30-01-2001”
  • If I rename to “HTTT_02-02-2001”. The property “Event Date” auto update to “02-02-2001”

How can I do that?

What is the use case for the filename property. If you need to get the filename for a query you don’t need a property. The reason I have a property called ‘filename’ is to fall back on in case something happens in my file system that changes the name of my file unintentionally. I could then use the property to determine what the real filename should be. If the property just mimics the current filename, an accidental change would also change the property making it useless.

1 Like

I’ve not heard of any tools/plugin catching on the file name change, and then updating a property. But it wouldn’t should be that hard to make a Templater template to use for the renaming which might be combined with using processFrontmatter to update the property.

Or depending on where you want to use this property to actually do a substring on the file name instead of the property name.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.