Page 1 of 1

Extracting Content & Renaming File

PostPosted: Fri Feb 14, 2025 12:37 pm
by robodean
So. I have been trying to create a rule that matches content in a file and then renaming the document.
I am stuck.

each file has this text on the 3rd line:
Last Updated: 8/3/2024 at 02:00 PM

I want to extract the date, and rename the file.

RULE:
Contents->contains match-> "Last Updated: [date]"
Result: Green arrow! YAY!

Then I did a test
Add comment->[date]
and it worked! also yay!
(oddly enough, Hazel extracted the date and ignored the rest of the line, and then formatted it as year-month-day, which is what I wanted, but never told it to so. still...YAY.)

BUT...when i try to rename the file, the rename does nothing. Literally.
Rename->with pattern->[date]--[name][extension]

https://share.cleanshot.com/qJHDCPSb

very confused, also help?

Re: Extracting Content & Renaming File

PostPosted: Fri Feb 14, 2025 12:54 pm
by robodean
I am an idiot.
And I feel the need to describe my idiocy as a cautionary tale.
My rule actually works perfectly. Why was it not working? Because I kept forgetting

TO SAVE IT.

Sigh.

Re: Extracting Content & Renaming File

PostPosted: Mon Feb 17, 2025 11:23 am
by Mr_Noodle
No problem. We all have those moments.