Page 1 of 1

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

PostPosted: Sat Jul 07, 2018 2:09 pm
by jfisher
Hey

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.

Re: Token "Custom Date" format not carried over to rename fi

PostPosted: Mon Jul 09, 2018 10:54 am
by Mr_Noodle
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.

Re: Token "Custom Date" format not carried over to rename fi

PostPosted: Mon Jul 09, 2018 10:58 am
by jfisher
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.

Thanks