Page 1 of 1

Help for a newbie in renaming documents

PostPosted: Sat Aug 14, 2021 3:04 pm
by DIYerUK
Hi all,

Very new to Hazel (a couple of days) but enjoying it so far.

I am wondering if the hive mind could help me with an issue I have encountered.

I would like to export PDFs from email for work. Not all, only a select few.

I would like to rename the PDF that is generated, but I would like to rename it in a certain way, which looks as follows:
[date] - [sender] > [receipent] - re: [subject line].pdf
So, by way of example, it would look:
2021-08-14 - Paul Smith > John Smith - re: New Boat.pdf

I have got as far as adding a custom date and Hazel retrieving that from the heading of the email. The subject line is the existing name of the file, so that is also easy. So, in short I'm stuck on pulling the "to" and "from" data from the same heading and dumping that into the new name for the file.

Is there a way I can do this?

I suspect it can be done, but I just can't work it out.

Any guidance is gratefully received.

Many thanks

Re: Help for a newbie in renaming documents

PostPosted: Mon Aug 16, 2021 10:16 am
by Mr_Noodle
I think you'll need a script to extract that info.