Read contents then email file name once found

Get help. Get answers. Let others lend you a hand.

Moderator: Mr_Noodle

Read contents then email file name once found 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
aculee
 
Posts: 15
Joined: Wed Apr 05, 2017 9:08 am

That should be doable though you'll need to use Automator or AppleScript to do the mailing part.
Mr_Noodle
Site Admin
 
Posts: 11880
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

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.
aculee
 
Posts: 15
Joined: Wed Apr 05, 2017 9:08 am

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.
Mr_Noodle
Site Admin
 
Posts: 11880
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

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
aculee
 
Posts: 15
Joined: Wed Apr 05, 2017 9:08 am


Return to Support