Automatically rename receipts to Merchant Name?

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

Moderator: Mr_Noodle

Hi!

I've been scratching my brains to try to figure out how to automatically extract the merchant name (e.g. Apple, Amazon...) from a document. Within the Hazel renaming attributes I found "Merchant Name", but when using it this part of the file name gets left blank. Despite google searching I'm not finding anything - except people trying to sell me witch hazel extract, I don't know when the feature was introduced or I'd try to read the release notes (but searching those reveals nothing either).

Can anyone suggest a solution beyond "one rule per vendor" which will allow this to work? All the documents in question are PDFs created from emails or PDF invoices, which means they are all OCRed.

Running macOS Sierra, non-beta as well, should that help.

Thank you in advance! :)
Cascades42
 
Posts: 4
Joined: Thu Jul 28, 2016 1:35 pm

Note that those attributes are provided by the OS, not Hazel. I'm guessing some app provides that but that doesn't mean that other apps know about it and provide it as well. So chances are it won't be applicable to most files.

You'll probably have to try and match contents. If the name you are looking for is in the same place in all the documents, then you might be able to get away with a single rule instead of one per vendor but that depends heavily on the documents in question.
Mr_Noodle
Site Admin
 
Posts: 11872
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Mr_Noodle wrote:Note that those attributes are provided by the OS, not Hazel. I'm guessing some app provides that but that doesn't mean that other apps know about it and provide it as well. So chances are it won't be applicable to most files.

You'll probably have to try and match contents. If the name you are looking for is in the same place in all the documents, then you might be able to get away with a single rule instead of one per vendor but that depends heavily on the documents in question.


Thanks! I was hoping that you had somehow written the magic script which could identify merchant names within a PDF :P

I'll just make one rule per vendor - thankfully I don't shop in all that many places so it shouldn't take too long :)
Cascades42
 
Posts: 4
Joined: Thu Jul 28, 2016 1:35 pm

Mr_Noodle wrote:Note that those attributes are provided by the OS, not Hazel. I'm guessing some app provides that but that doesn't mean that other apps know about it and provide it as well. So chances are it won't be applicable to most files.

You'll probably have to try and match contents. If the name you are looking for is in the same place in all the documents, then you might be able to get away with a single rule instead of one per vendor but that depends heavily on the documents in question.



Hi, i have a question to your comment of that company issue.

How have to be the rule if i always want to use the first word in an ocred pdf file for using to rename my file?
Thanks a lot
br Alex
kites30
 
Posts: 2
Joined: Thu Dec 01, 2016 11:14 am

You could try matching something like "(anything) " (note the space at the end). That will match the first sequence of characters up to the first space.
Mr_Noodle
Site Admin
 
Posts: 11872
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City


Return to Support