Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

Possible Duplicate:
How to Change File Type Associations?

Every time I get a machine that I install XCode on, it associates itself with all kinds of filetypes. E.g., .xml, .rb, even .java! It's such a nuisance to have to re-associate those file extensions individually. If I want to open XCode, I'll open XCode, but I never want to open XCode by double-clicking on a script or using open.

Is there any way to globally disassociate XCode from all file types? More generally, is there any way to do this for any app (e.g., QuickTime)?

share|improve this question

marked as duplicate by bassplayer7, patrix, Diago, Mark, jmlumpkin Jan 23 '13 at 14:51

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

add comment

3 Answers 3

You could delete the CFBundleDocumentTypes array in the Info.plist, but it is also used to define file types like xcodeproj. It would also invalidate the code signature (so you'd have to enter a password to access keychains), and the changes might get overridden by updates. Some applications like TextEdit crash on launch if the Info.plist is modified.

To update the Launch Services database, run /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -R -f /Applications/Application.app/.

You could also unregister the application by running lsregister -u -R -f /Applications/Application.app/, but I don't know if it would get registered again at some point. It would also remove the icons of file types defined by the application.

If you are looking for a faster way to change default applications, take a look at duti. I have published my configuration file (which includes common code and video file types) here.

share|improve this answer
    
+1 for duti. That is a step in the right direction. –  Tobia May 25 '13 at 10:21
add comment

Actually, I don't think you can.

See, OS X make the association by looking into the application's plist file. So you either have to edit that plist file or made changes to the way it detects file type association.

There MIGHT be ways to directly manipulate the database, but it might be too difficult. So try this:

Right click (control-click) on the file belonging to the file type you want to open, and as the contextual menu shows up, hold option. You will see "Always Open With", it won't disassociate, but it will change its priority.

share|improve this answer
add comment

The only way I can think of doing this is by going to the individual file types and right clicking and going to get info, going down to open with, and clicking the program you want to use and clicking change all.

Another way to do this is by right clicking, and holding option and going to always open and clicking the program you want to use

Hope This Helps

share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.