I've got a tool to normalize WAV audio files, but it only works by dragging and dropping the file either onto the GUI or onto its dock's icon.

As far as I know the app doesn't have any option to pass from command line, so I was wondering whether there is a way to pass the file from a terminal in order to use it in a bash script.


2 Answers 2


Generally this is equivalent to dragging a file onto an app's icon:

open -a Your_WAV_Tool.app /path_to/your_file.wav

You can use the complete path to your app if it isn't in an expected place.


I can't answer for certain, but it sounds like a no. Unless the app reads command line arguments, you can't pass it the file. And I don't think you can't trigger GUI events without a GUI.

The best solution I can think of is using something like Automator to try and simulate the drag and drop. But a quick look through Automator doesn't seem to show anything event simulation.

So the last option is writing your own program to literally drag and drop a file. You can then write a command line interface for your program. This can be achieved with Java's Robot class.

  • I'm not sure how attached you are to your conversion app, but you can definitely use other command line conversion tools. See this question: apple.stackexchange.com/questions/26099/…
    – styfle
    Dec 18, 2012 at 21:26
  • please see this question, Levelator only comes in GUI App
    – rraallvv
    Dec 25, 2012 at 23:13
  • @rraallvv I would download the linux version since it is written in Python and just call the function directly instead of using the wxPython bindings. I'm assuming the only thing preventing the linux version from running on OS X is the GUI.
    – styfle
    Dec 26, 2012 at 19:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .