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

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

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.
Last edited by phonek on Thu Jan 23, 2025 1:56 pm, edited 4 times in total.
phonek
 
Posts: 2
Joined: Wed Jan 22, 2025 1:53 pm

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.
Mr_Noodle
Site Admin
 
Posts: 11865
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

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.
phonek
 
Posts: 2
Joined: Wed Jan 22, 2025 1:53 pm

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.
Mr_Noodle
Site Admin
 
Posts: 11865
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support