I am looking to change a file association on the Mac using some sort of script. I know that I can do something like that in Windows using the assoc command.

Is there something scriptable on macOS which will do a similar job?

  • What exactly are you hoping to accomplish? – tripleee Nov 11 '20 at 13:38
  • I'm was going to create an answer for this, explaining how the duti program performs exactly the same duty as the assoc command. However, this has now been marked as a duplicate for an answer, where I cannot add my answer, as that question requires a solution without third party software. – jksoegaard Nov 11 '20 at 13:48
  • Have a look at: https://github.com/moretension/duti – user3439894 Nov 11 '20 at 13:59

No. Apple file mapping is implemented very differently than windows does it. The file metadata has many variables that affect launch services and mapping a particular file to a particular app.

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