2

I always thought I could drag-drop a target file onto a src executable in Finder, and make macOS perform src target.

But I don't seem to be able to do it and I’m not even able to recall if this was something that used to work or there’s a change where a program needs to have some attributes to allow this.

enter image description here

At the command line, the dec program would take core.enc as standard in or an argument.

dec core.enc

Is this something Finder can do with any programs or just ones that have some documented metadata / associated files?

EDIT: Linked Question (referenced in comments): How to associate file extension with executable using bash?

  • 2
    Can you add some details, including what kind of executable the target it, and where exactly its icon is placed the moment you drag a document onto it? – nohillside Jun 2 at 7:49
  • I've added a pic – P i Jun 2 at 17:03
  • 2
    Ah. This only works for applications where Finder knows that they are able to open the file type you are trying to drop. Which probably gets us back at your other question... – nohillside Jun 2 at 17:13
  • 1
    Yes - I’ve edited this a bit so someone will probably be able to link to Apple developer documentation that explains what makes an application register (or be recognized) with launch services which would see the file type being dropped, and decide if your program is capable of being passed that document to open. – bmike Jun 2 at 17:14
  • 2
    FWIW I've only seen this behavior for application bundles, not standalone binary executables, and only when the proper registrations exist in the launch services database. For standalone binary executables, one needs to pass the target file as an argument on the command line in Terminal. – user3439894 Jun 2 at 17:29

You must log in to answer this question.

Browse other questions tagged .