Page 1 of 1

[Solved] Rename file - rule not repeating [new user]

PostPosted: Wed Jan 22, 2025 2:22 pm
by phonek
New user, with an issue...

I have a PDF file named after today's date, with the file extension showing:
2025-01-21.pdf

How do I get Hazel to automatically change this to the new day's date every day, keeping the extension – i.e.:
2025-01-22.pdf etc.

The problem is that currently my rule doesn't seem to work automatically at midnight when the date changes, but only when I manually hit the Run Rules Now button in Hazel – screenshot of rule:
Image

Note: "date w/dashes' and 'current date' are both set under Edit Attribute to style "1999-12-31":
Image Image

Thanks in advance.

Re: [Unsolved] Rule problem I need help with [new user]

PostPosted: Thu Jan 23, 2025 9:44 am
by Mr_Noodle
The way you have the rule set up, the rule will only fire once. You need to give it a condition to tell it to update.

You could add a condition like "• date w/dashes" is before today which would match anytime the filename lags behind.

Re: [Solved] Rule problem I need help with [new user]

PostPosted: Thu Jan 23, 2025 12:08 pm
by phonek
Added, like this:
Image

Now seems to work so far, so marked as Solved. :)

Not sure if this is the best way of doing such a file rename, but took some fiddling to get a rule with regards to the extension being kept and not removed.

Anyway, will post again if fails and need more help. Thanks again.

Re: [Solved] Rename file - rule not repeating [new user]

PostPosted: Fri Jan 24, 2025 10:47 am
by Mr_Noodle
As far as the extension goes, when you select the Rename action, the extension attribute is there by default. I recommend not deleting that unless you intend to change or remove the extension.