Always open a file in a specific program

filesystemterminal

I'm having an issue with forcing a file of a certain type to always open with a specific program. In this case, it's .indd (Adobe InDesign) files. I have Adobe CS6 installed, and also Adobe InDesign 5.5. I would like to always open .indd files with InDesign 5.5.

I've tried using Get Info > Open with: > InDesign 5.5 > Change All... but it keeps automatically switching back to CS6, immediately after clicking Change All....

Is there perhaps a way I can force this in Terminal?

Best Answer

If you don't mind specifying InDesign 5.5 every time, then this command line should work:

open -a 'InDesign 5.5' myfile.indd

If you're going to do this often, you can wrap it in a shell script or bash function like

function indd() { open -a 'InDesign 5.5' "$@" ; }

Then you'll be able to simply say

indd myfile.indd