Page 1 of 1

Read contents then email file name once found

PostPosted: Wed Apr 05, 2017 9:17 am
by aculee
Hi,

This is my first post as i'm a Hazel newbie :D

I can get Hazel to content search within a PDF file for a particular 'keyword' then email me the file if found via Outlook, is there a way that I could get an email stating which file the word was found in?

something along the lines of 'Keyword found in the file: testfile1234.pdf'

Thanks in advance :D

Re: Read contents then email file name once found

PostPosted: Wed Apr 05, 2017 11:03 am
by Mr_Noodle
That should be doable though you'll need to use Automator or AppleScript to do the mailing part.

Re: Read contents then email file name once found

PostPosted: Thu Apr 06, 2017 3:40 am
by aculee
Mr_Noodle wrote:That should be doable though you'll need to use Automator or AppleScript to do the mailing part.


Thanks for the feedback, I've managed to get mail to send me a notification without including the file but can't seem to figure out how to tell me which file it found the words within yet.

Re: Read contents then email file name once found

PostPosted: Thu Apr 06, 2017 11:11 am
by Mr_Noodle
Hazel sends the path of the file in to Automator/AppleScript so you'll need to take that and do something with it. If you are using AppleScript, search the forums as there should be scripts showing this.

Re: Read contents then email file name once found

PostPosted: Tue Apr 11, 2017 5:07 am
by aculee
Mr_Noodle wrote:Hazel sends the path of the file in to Automator/AppleScript so you'll need to take that and do something with it. If you are using AppleScript, search the forums as there should be scripts showing this.


Thank you :D