MacOS – Why does Automator get stuck in a loop when processing a large number of files

automatormacos

I have a very long workflow dealing with renaming, resizing and duplicating a large number of high resolution images. The workflow was working fine until I tried it with 300 images. Automator got through about 15 actions and then just spins on a particular action. I can see it gets about half way through this action (looking at the images it is supposed to be resizing, number 180 and before are resized, but nothing after).

  • Automator is still responsive – I am able to stop the task while with the stop button.

  • Reducing the number of files (say to 170) solves the problem. I have not tried anything higher than this.

  • Automator stops on the same action every time (resize to 480 pixels)

  • The workflow description:

    • The original size of the images are 3920 × 3072.
    • There are about 30 actions.
    • The output is about 5 different sizes of the images and two PDFs (made up of the images).

Has anyone else experienced problems? I would be happy with just a work around, because using Automator just saves so much time.

More Information

This is the offending action:
enter image description here

Detailed Description of the workflow:

  1. Copy 300 images at 3920 × 3072 pixels (base images)
  2. Rename the images
  3. Copy and Scale the 300 images to 50% of the base image size
  4. Rename the images
  5. Copy and Scale the 300 images another 50% (now 25% of the base images)
  6. Rename the images
  7. Copy and Scale the 300 images to 480 pixels (this is the step that Automator gets stuck on)
  8. The script goes on the copy and scale the images again, create two 300-page pdfs and then rename all of the images one more time.

Testing Notes

  1. When just copying and scaling the 300 images by 480 (three actions), the operation still does not complete…
  2. The workflow does not get stuck on the same image every time. I tried three times and the image number was:

    • 176
    • 182
    • 183

Current Workaround

I currently am splitting the input of the action into three with a filter and running the action three times of each of these groups and then combining the groups again. Using the filter does not work on my network drive (not indexed by Spotlight apparently). It is also a large number of extra steps. Would still be interested to hear any solutions or better work arounds – especially since this work around requires a large number of extra steps…

Best Answer

I resolved this by getting the Finder Automator Action pack from Ben Waldie. Check it out here:

http://www.automatedworkflows.com

I use the following automator action successfully:

enter image description here

You should get it, as this works for me.

Phil