I use Drafts to enter my ideas. Once a week, I reviewed my Drafts and saved those I needed into iCloud as files. In Drafts, it will always put the timestamp in the first line when it saves, for example:
//Sat, 19 Feb 2022, 9:42 PM
The issue at hand is Drafts will set the Create Date to the current date-time when it creates the file. My notes could be taken a week ago but the Finder will show that the exported files are created today.
I have a Hazel rule that I want to use to help me fix the file's metadata. I managed to match the timestamp above in the condition. But I don't know how I can make Hazel change the Created date of the file. In theory, I should run a Terminal command to do "touch -t [date] %1", but what can I put as [date]? The touch command expects the date format to be yyyymmddhhmm, for example, 202202192142, but Hazel's date attribute, which I called z-now, is in this format: 19 Feb 2022, 9:42 PM
I appreciate any guidance or pointers to the right direction. Thank you.