Tagging based on filename

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

Moderator: Mr_Noodle

Tagging based on filename Wed Mar 21, 2018 12:31 am • by thebookbloke
Hi

Here's a couple of my file names:

Cricks, Jane - 1881 Census Schedule.jpg

Allin, Francis - 1835 Baptism Register.png

I might want the file to carry three tags: the surname (Cricks or Allin), the type of document (Census or Baptism), and the date (1881 or 1835).

Can I use Hazel to extract strings from the filename and use them as Finder tags? It'd be great if I could because I have thousands of these files and will accumulate more pretty regularly.

Cheers

Mick
thebookbloke
 
Posts: 2
Joined: Wed Mar 21, 2018 12:20 am

Re: Tagging based on filename Wed Mar 21, 2018 10:53 am • by Mr_Noodle
Check out "match patterns" (search for them in the help). You can create custom attributes to grab the text you want. Then, in the "Add tags" action, you can create a dynamic tag to insert those back in.
Mr_Noodle
Site Admin
 
Posts: 11872
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Re: Tagging based on filename Thu Mar 22, 2018 12:39 am • by thebookbloke
Thanks. That seems to be the way forward. Have had success with most files. The exceptions have had names with an inconsistent file name structure. I can fix that.

Great stuff.
thebookbloke
 
Posts: 2
Joined: Wed Mar 21, 2018 12:20 am


Return to Support