Token "Custom Date" format not carried over to rename file

Talk, speculate, discuss, pontificate. As long as it pertains to Hazel.

Moderators: Mr_Noodle, Moderators


Came across this while doing some sorting and don't know if it is intended functionality or not but it surprised me.

I was trying to sift through some files that have their dates in mismatched order by using a "Custom Date" token to find the month and year from the filename and re-use those tokens to properly rename the file in a consistent format.

I adjusted a "Custom Date" token to match month "mmmm" and one for "YYYY". When you go to re-use these tokens to rename the file Hazel defaults to the date format "YYYY-MM-DD" even though I am using a "Custom Date" token that has been formatted differently.

I am thinking this might be a small bug as any other custom token carries over its formatting for use later in a rule.

Just a thought.
Posts: 42
Joined: Sat Feb 25, 2017 7:47 pm

The format you use to match the date is different from how you format it later. A date is a point in time; it has no inherent format.

Once you have a date in a custom attribute, every time you use it in an action, you need to set the format if you want something different than the default. Click on the attribute and do "Edit format". You can then have it appear as you'd like there.
Site Admin
Posts: 8703
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Thank you for the explanation.

I was expecting the format of the custom token to be carried over as default and I would change it if I wanted something different. However, if that was the intended functionality I will remember.

Posts: 42
Joined: Sat Feb 25, 2017 7:47 pm

Return to Open Discussion