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 need to make a bash script to that I can drag a .rar file on top of it and then the script will receive the pathname of that file as argument 1 ($1). I have made the bash script, but how do I make it to be an application (right now MAC OSX is treating it as a text file even though I did chmod +x) and how do I enable the drag-n-drop of a file?

Best Regards,

Mads Ravn

share|improve this question
up vote 6 down vote accepted

You should be able to turn your script into an application with Automator - Applications -> Utilities -> Look for an option called "Run Shell Script" and once you're done, it should behave like other apps in that anything that is dragged and dropped on it will be run with it. Good luck!

share|improve this answer
Thanks a lot. That did it. – Mads May 13 '13 at 18:32

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.