Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to create an automator workflow that will do a google search for the filename of each selected file in finder.

Unfortunately the workflow I have created works just with one selected file. If I select multiple files it doesn't work.

How can I set the Shell Scrip to be executed individually for each selected file in Finder?

Screenshot of Automator Workflow

I have used a custom 'Get Names of Finder Items' Automator Action downloaded from here.

share|improve this question
up vote 1 down vote accepted

Use a shell script such as the following that will run the command each time for each of the arguments:

for f in "$@"
  open "$f"
share|improve this answer
Thanks a lot! This works perfect! – MG3165195 Jan 6 '14 at 11:58

Your Answer


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.