MacOS – Move similarly named images into a folder with the same name

automatorgraphicsmacos

I am trying to create an automator app which will take all the images which are similarly named and create a folder with that name and move the images then into that folder and then archive that folder.

Thus turing the following into three folders:

Some long or short name depending on what it was named by whomever 001.jpg
Some long or short name depending on what it was named by whomever 002.jpg
Some long or short name depending on what it was named by whomever 003.jpg
Some long or short name depending on what it was named by whomever 004.jpg
Short image name 001.jpg
Short image name 002.jpg
Short image name 003.jpg
Short image name 004.jpg
Short image name 005.jpg
Short image name 006.jpg
Short image name 007.jpg
Short image name 008.jpg
My Mom named this one – it's her parrot 001.jpg
My Mom named this one – it's her parrot 002.jpg
My Mom named this one – it's her parrot 003.jpg
My Mom named this one – it's her parrot 004.jpg
My Mom named this one – it's her parrot 005.jpg
My Mom named this one – it's her parrot 006.jpg
My Mom named this one – it's her parrot 007.jpg
My Mom named this one – it's her parrot 008.jpg
My Mom named this one – it's her parrot 009.jpg
My Mom named this one – it's her parrot 010.jpg
My Mom named this one – it's her parrot 011.jpg
My Mom named this one – it's her parrot 012.jpg
My Mom named this one – it's her parrot 013.jpg

would become:

Some long or short name depending on what it was named by whomever.zip
Short image name.zip
My Mom named this one – it's her parro.zip

Best Answer

After you launched "Automator" and created a workflow:

  1. Select "Files And Folders" at "Actions".
  2. Double click on "Find Finder Items" and setup what and where to find your files. Which means: select the folder where the first group of pictures are stored. And enter the search condition (Name contains "whomever").
  3. Run the workflow to see the result - you should see what you expect. Which means: you should see all the files containing "whomever".
  4. Double click on "Create Archive" and setup how to name the archive and where to save it.
  5. Add step 2 and 4 for the other 2 file name groups.
  6. Run the workflow.

But I can not see why you need the "Automator" for this. You could do all this very easy in the Finder:

  1. Select the files of the first group: click on the first file of one group (named "whomever..."), hold down the "shift" key and click on the last file of the first group.
  2. Select "Compress" in the File menu of the Finder. You will get an archive named "Archive.zip". Rename it to "whomever.zip".
  3. Proceed with step 1.

It might help to set the "View" of the Finder to "List".