Page 1 of 1

Match name and print to doc

PostPosted: Fri Oct 16, 2015 9:04 pm
by jaguirre
Hello Mr Noodle!

I'm hoping you can help me. I have a huge photo database that I used Hazel to place into folders like this

Year > Month > Event

Sometimes there's duplicate events because I named them slightly differently and threw them into my "Wormhole" that processes them by date so I'm left with files like this

Bob's Bachelor Party 2012
Bob's Bachelor Party

I would like to tell Hazel to do this:

1. Go into Sorted Photos
2. Go down into Year
3. Go down into Month (i think these three would be "run on folder contents")
4. Find folders with the SAME name "bob"
Action:
5. Copy the matching folders name AND path and paste it into a document or somewhere I can read it on a list.

Thanks so much! :D You're program has saved me a years worth of time sorting through 50k+ photos and videos!

Re: Match name and print to doc

PostPosted: Mon Oct 19, 2015 11:38 am
by Mr_Noodle
You'll need a script to do parts 4 and 5. Actually, you might be able to do 4 using built-in mechanisms but it depends heavily on what you consider the same name to be and if there's a common pattern. For example:
Code: Select all
If (all) are met
    If (all) are met for (the enclosing folder)
        If (all) are met for (any of its sub-files...)
            Name matches (• event name) (number)
    Name matches (• event name)

To get the nested conditions, hold down option while clicking the + button to create new conditions. •event name is a custom attribute you create to match the name of the album/event. What this does is match the event folder if another folder with the same number, plus a number (the year) exists in the same folder.

You will still need to do a script to record that to a file though.