Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I followed this simple guide to resize images in a batch with Automator: copy

  1. copy file to resized folder on Desktop
  2. add suffix _S (for small)
  3. resize it to 25% of its original size

First Workflow

Though I want to resize into multiple sizes:

  1. copy file to resized folder on Desktop
  2. add suffix _S (for small)
  3. resize it to 25% of its original size
  4. copy file
  5. add suffix _M (for medium)
  6. resize it to 50% of its original size

Second Workflow

Unfortunately this results in the second resize being applied to the already resized image.

So, is there a way to reset the chain back to the original file and not the resized file?

share|improve this question
add comment

1 Answer 1

up vote 1 down vote accepted

The easiest way would be to re-order your workflow a bit.

Instead of making the small size first, then the medium size, make the medium size first, then create the small size from the medium.

So your workflow would look like this:

  1. Copy Finder Items to the folder you want
  2. Add Text to append the _M
  3. Scale Images to 50% (if that's the medium size you want)
  4. Copy Finder Items to make the small file
  5. Change the Add Text action to Replace Text, replace _M with _S
  6. Scale Images to 50% (50% of the already scaled image will be 25% of the original)

This is what it should look like: workflow

General Method Using Variables

The above method works well for your particular situation, given the sizes you wanted. But if you need oddball sizes, or are doing some other action where feeding the output of the first task into the second won't work, Automator's variables can be used.

You can use the Set Value of Variable action to store the original input in a variable, then recall it for later use with the Get Value of Variable action.

With this method, your workflow would be:

  1. Set Value of Variable and specify a variable name
  2. Copy Finder Items to the folder you want for the small images
  3. Add Text to append the _S
  4. Scale Images to 25%
  5. Get Value of Variable with Ignore this action's input checked (click the Options button on the action if you don't see this)
    • Make sure the variable selected is the one set in step 1
  6. Copy Finder Items to the folder for medium images
  7. Add Text to append _M
  8. Scale Images to 50%
share|improve this answer
1  
Very thorough answer, thanks a lot for that. I went the variable route and it worked like a charm. What should be added though is that "Ignore this action's input" must be checked on the "Get Value of Variable" action to ignore the initial input and take the variable contents instead. unfortunately I can't vote up with my low rep =( –  owzim Nov 3 '12 at 20:37
    
Good catch on the ignore input setting. I checked that in my test workflow, but forgot to add it to the answer. I'll update it. –  robmathers Nov 3 '12 at 20:41
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.