Page 1 of 1

read exif line and sort files based on the info

PostPosted: Mon Dec 06, 2021 11:43 am
by Black2Back
Hi!
I have a Sony A7-3 and so my photos are ARW-Files with some little XMP-info.
Based on the "rating" info I want to sort my photos.
I'm not just familiar with deep dives in hazel, I'm the overall king of writing complex scripts. In fact, I have exactly one simple row for a OCRmyPDF, that's all. So please be kind and type slowly so that I can keep up :) !

So, I have hazel 5.1.1
I have exiftool from today
I know, when I bash
Code: Select all
exiftool file.arw -rating
... I get the correct value back.
Now my (much too simple) question is, how can I motivate a robot to read my files and sort them into the right subfolder?
It can be easy-scripted. If there's a script that reads rating=5 and sorts it into folder5, it's ok. I can do the same script for the other rating numbers.

thank you in advance!
erik

Re: read exif line and sort files based on the info

PostPosted: Tue Dec 07, 2021 9:51 am
by Mr_Noodle
If you want to pass that value back to Hazel, you will need to use AppleScript. You can have AppleScript execute a shell script. Check the chapter in the help on AppleScript on how to pass the value back. If you run into specific problems, post back here.