MacOS – Make folders opened by external apps open in a new finder tab rather than a window

finderlaunchbarmacostabs

I have the setting "open folders in new tabs" (instead of new windows) in finder turned on but this does not seem to influence what my other apps do when they open a folder. Launchbar and a shell script I run from emacs still opens folders in small finder windows. How can I make folders opened from external apps all appear in one tabbed finder window?

Edit: Bmike in the comment is right that this could probably be done via an applescript. Something like this:

  1. You have some script that gives you the path of the folder you want to open.
  2. You pass this as a variable to an applescript.
  3. This applescript saves the pathname as a variable
  4. It activates finder or opens a particular folder with finder.
  5. It sends the keystroke command + t to open a new tab (or does the same with a command to finder).
  6. It sends the keystroke command + shift + g to finder opening the go to folder with path x menu/window.
  7. It writes (systemevents) or pastes it (set clipboard to the variable that is the path of the folder) into this menu/window.
  8. Click enter. The folder is opened.

Best Answer

I did this, not sure if it will answer it for you.

Finder Preferences > General > check "open folders in tabs instead of new windows"