Creating folders & moving sets of images into them?

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

Moderator: Mr_Noodle

Hi, I'm a newbie & I've made a couple simple Hazel rules that saved me a ton of time but I've got something more complex that I can't figure out how to do (and couldn't find this answered elsewhere here).

Every day I generate several still images from videos of dogs up for adoption and place them in a folder. Each dog has an ID number (example: dog #1 ID number is A4978497). There are several still images for each dog. For example the 1st dog would have an ID number A4978497 and this is how the filenames look:

A4978497-3 F_01 2.jpeg
A4978497-3 F_01 3.jpeg
A4978497-3 F_01 5.jpeg

The 2nd dog might have an ID number A4981214 & would have several still images with these filenames:

A4981214-1 F_01 2.jpeg
A4981214-1 F_01 3.jpeg
A4981214-1 F_01 4.jpeg
A4981214-1 F_01 5.jpeg

I do this process every day which generates lots of images - all of them end up in this one big folder.

What I'd love to have Hazel do is look at the first 8 characters of all the .jpeg file names in this big folder (for example: A4981214) and then have Hazel create a folder named the dogs ID# (example: A4981214) within the big folder and move all that dogs photos (in this case, that start with A4981214) into that dogs new folder.

Does this sound this possible?
twistlick
 
Posts: 6
Joined: Mon Aug 29, 2016 10:53 pm

Yes. Look up "match patterns" in the help. You can create a custom attribute to grab the ID and then use that in the Sort into subfolder pattern.
Mr_Noodle
Site Admin
 
Posts: 11879
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Thanks SO much for the tips. I went ahead and looked up everything in the HELP section and I got sort of close but I guess I don't have much of a programmers mind because I couldn't quite get there still. Here's a graphic I made up showing where I made it using your tips and where I'm aiming for. If you have any more tips it would be much appreciated if you have time.

https://db.tt/0efk8Yui
twistlick
 
Posts: 6
Joined: Mon Aug 29, 2016 10:53 pm

You need to create a custom attribute to capture that first number so you can re-use it later. The help should have an example of that which you can follow.
Mr_Noodle
Site Admin
 
Posts: 11879
Joined: Sun Sep 03, 2006 1:30 am
Location: New York City

Thanks SO much! I got it working thanks to your help. A huge time saver.
twistlick
 
Posts: 6
Joined: Mon Aug 29, 2016 10:53 pm


Return to Support

cron