Page 1 of 1

Tagging image files based on Device Model

PostPosted: Sun Dec 18, 2016 3:37 pm
by bill
Hi there, I'm using Hazel to tag/rename/sort my massive photo library of 10 years.

In addition to Year and Quarter, I am wanting to tag images either "iPhone" or "Nikon" based on the device that captured the image (any model iPhone, any model Nikon). But, I'm having problems getting Hazel to evaluate the Device Make or Device Model conditions.

The test file is definitely an iPhone image. Have confirmed in mlds and exiftool that the value for Device Model is "iPhone 6" - I have tried the same with Device Make contains "Apple" and it also fails.

What am I doing wrong? I am hoping to avoid having to write a script that uses exiftool if at all possible.

Image

Re: Tagging image files based on Device Model

PostPosted: Mon Dec 19, 2016 2:24 pm
by Mr_Noodle
If you click on the red x, it will show you the actual value for that attribute. That should give you a better sense of where it's going wrong.

Re: Tagging image files based on Device Model

PostPosted: Mon Dec 19, 2016 4:49 pm
by bill
Thanks for the hint. Clicking on the red X tells me that the Device Make and Device Model attributes are blank. So, the tags are there in EXIF but not populated in Spotlight. If I understand correctly, that will preclude me from using Hazel's preset logic because it is not reading the EXIF data. So, I have to try scripting this after all. I've gotten this far, but it doesn't work. (Error: Not Matched)

exiftool -if '$make =~ /apple/i' -dummy $1

I asked for some tips over at the ExifTool forum but the response there was that this is a Hazel issue.

Any further advice to make this script work?

Re: Tagging image files based on Device Model

PostPosted: Tue Dec 20, 2016 1:23 pm
by Mr_Noodle
I'd look into why Spotlight isn't indexing the files. Check your Spotlight privacy settings and try rebuilding your Spotlight index (google it as there are different methods - use the one you are most comfortable with).

Re: Tagging image files based on Device Model

PostPosted: Tue Dec 20, 2016 4:37 pm
by bill
Thank you Mr. Noodle.

It will be no surprise to you that this was a case of user error... I had been trying to run the rule on a folder residing on my Synology NAS - the idea being that files could be added to the folder from any computer on my network, and Hazel would process them from my laptop whenever I connected to the drive. Your suggestion led me to realize that Spotlight indexing was not enabled on my NAS. I entered the below command in terminal, Spotlight indexed the drive, and Hazel is now slaying the file without batting an eye:

mdutil /Volumes/name -i on

I take back all the mean things I said about Hazel in my head.