How to unlink a file type in OS X

If you need to prevent a specific file type in OS X from opening a handling application, you can do so through several means.

For every application installed on your Mac, OS X will scan its document-handling capabilities and store them in its Launch Services database, which it then uses to pair up document types with the applications that are built to handle them. Therefore, if you install a new image-handling tool on your system, when you right-click image files or get information on them you should see this program be available in the "Open With" section as an optional handling program.

This service is convenient for ensuring that documents can be opened directly from the Finder; however, it assumes you always want to have a specific handling program launch when you open one of these documents. While this may be true in some cases, you may have some instances where you would like the system to not automatically open specific file types, or at least ask you whether you would like to do so with a given application.

MacFixIt reader Dave recently wrote in with such a situation:

I know how to change the program associated with a particular file type that will automatically open when you click the file name. But, how do you change that association to "null"? I am constantly moving JPEG files around, and I don't want any program to open when I click to select a group. I would like to have to manually select the "open with" program to open a JPEG.
Document Info window in OS X
You can set the program with which to open a document in its information window. Screenshot by Topher Kessler/CNET

Unfortunately OS X's built-in services are fairly application-centric, meaning that while you can register or unregister a specific program's capabilities from the launch services database, you cannot simply clear a file type; however, there is an approach you can use to work around this by assigning the document to a persistent program such as the OS X Finder.

To do this, select one of the file types of interest in the Finder and press Command-I to get information on it. Then go to the Open With section and choose "Other" from the drop-down menu. In the Open dialog window that appears, be sure to choose "All Applications" from the "Enable" drop-down menu and then navigate to the Macintosh HD > System > Library > CoreServices folder where you should be able to select the Finder as the program to use for opening the file.

With the Finder selected, now click the "Change All" button in the Info window for the document to make this the default program for all of this file type. Following this, if you open one of these document types the system will leave it be and simply show you the Finder (which you should already be in).

In this way, you can nullify the direct opening of any document type; however, another approach is to have the system ask you for what program to use every time a document of this type is opened, by creating an Automator application that will handle the document and present a list of the applications to use for it. To do this, open Automator and then follow these steps:

Custom application launcher in Automator
Be sure to check this box to show the action when run, so the system will prompt you for what program to use (click for larger view). Screenshot by Topher Kessler/CNET
  1. Create a new Application workflow.
  2. Locate and drag the "Launch Application" action to the Workflow area.
  3. Click the action's Options button and check "Show this action when the workflow runs."
  4. Save the workflow as an application called "Launcher" in your Utilities folder (though you can save it anywhere and with any name).

With this application created, go back to the document type of interest and change its default handling program as described above, but instead of using the Finder choose the newly created "Launcher" program. Now when you open any documents of this type the system will open this program and ask you to choose a program from the drop-down menu, which it will then try to use to handle the document.

Questions? Comments? Have a fix? Post them below or e-mail us!
Be sure to check us out on Twitter and the CNET Mac forums.

Featured Video

An easy way to fix a sluggish iPhone or iPad

iPhone or iPad running slow? Try this.

by Dan Graziano