How to run rule on a subfolder generated by previous rule?

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

Moderator: Mr_Noodle

Hi everyone!

This is my first post, so please show understanding :)

I would like to process photos in few steps:

1. rename them based od the date (and precisely the time, too) modified (i.e. DSC0987.JPG to photo_2016-11-21_162753.jpg),
2. sort all the photos in subfolders with names based on the camera model from the EXIF data (i.e. Canon PowerShot S1),
3. create the Originals folder within the subfolders created in step 2,
4. copy photos in each camera named subfolders to Originals,
5. convert all the photos in camera named subfolders to png format (plus the extension correction),
6. resize converted photos, so the max width or height is 1024 px.

So as a result I'd like to end up with structure like this:

MISC_PHOTOS:
> CANON PowerShot S1:
>> photo_2016-11-21_162753.png (i.e. 1024x768 px),
>> Originals:
>>> photo_2016-11-21_162753.jpg (i.e. 4300x3128 px).
> SONY Alpha99:
>> photo_2016-11-19_112310.png
>> Originals:
>>> photo_2016-11-19_112310.jpg

The ">" represents the folder depth. The "Originals" folder creation, copying photos and resizing is done in the Hazel rule when the action is performed in Bash script.

First two steps works without a hitch, I use two separate rules. I have created the third rule which does everything as supposed but only if applied to the existing subfolder with camera name... Otherwise, it repeats creating the same "camera named" folders recursively or creates "Originals" in parent "MISC_PHOTOS" folder.

I think that the problem is with rule order or running the rule in subfolder with the correct subfolder depth. But I am stuck for a while and dunno how to solve this issue.
Last edited by mantis30 on Mon Jan 30, 2017 6:50 pm, edited 1 time in total.
mantis30
 
Posts: 3
Joined: Mon Jan 30, 2017 8:27 am
Location: Bydgoszcz, Poland

Can you do it all in one rule? It seems like just a sequence of actions on the same file so multiple rules may not be needed.
Mr_Noodle
Site Admin
 
Posts: 11872
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

I tried a lot of different approaches but it seems that without much sophisticated scripting, it is not easy to perform operations (run rules) on a dynamically generated subfolders' contents. So finally I decided to solve the problem with the folder created by the user (me). I am going to give it another try sometime, but at the moment need to let my grey matter rest ;)

PS. And yes, now it is just single rule.
mantis30
 
Posts: 3
Joined: Mon Jan 30, 2017 8:27 am
Location: Bydgoszcz, Poland


Return to Support