I have an application which loads using a bash script e.g


I can load this using bash like so


However, I would like to open a file with this executable (a file that was created with the executable and can be loaded)

Im wondering how to do this?

This doesnt seem to work:

"/Applications/My.app/Contents/MyExecutable" "/Users/MyUser/Desktop/MyFiletoload.xxx"

Is there any common way of doing this?

  • If the application has not been coded to accept a file to open in its run string, there is not a lot you can do. You will need the run string specification: many programs accept a file as the first non-option parameter; others use -f FileName; yet others use different parameters, depending on the type or purpose of the file; and some do not look at the run string at all, but rely on a dialogue to specify a file to open. If the application is reasonably well written, app --help should summarise the run string; if it's even better written, there will be a manual page man app. – AFH Nov 15 '14 at 12:30
  • Thanks for this. I think the problem is that this app used to allow loading of files, but it looks like they are blocked now. Very useful answer. Many thanks. – Ke. Nov 15 '14 at 17:44

As someone mentioned in a comment, it all depends on the application. It would need to be written to accept a file as an argument/parameter when running it. There are multiple ways to pass a file into an application, but it depends on how it is written.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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