osx - Batch change filetype associations on OS X
2014-04
I just installed Sublime Text 3 beta and would like to re-associate all the filetypes I have linked to ST 2 with ST 3.
Is there any way to perform this as a batch operation?
For example:
$ open_all_with_st3 py txt tsv css scss js ...
Or better yet, get a list of all types associated with ST 2 and then assign them to ST 3.
I really don't fancy doing the Get Info->Open With->Change All …
dance with dozens of filetypes.
I figured it out. I opened ~/Library/Preferences/com.apple.LaunchServices.plist
and replaced all occurrences of com.sublimetext.2
with com.sublimetext.3
.
By default PNG images open in Preview. At some point, this has changed on my system so that clicking on a PNG file launches Paintbrush. While that's a really nice app, I'd still like the default to be Preview. How to change it back? (I formulated the question title to be little more generic — how to do this for any file types?)
I'm looking for the easiest, most readily-available way, with no 3rd party tools or going to the command-line. Somewhat surprisingly, System Preferences seems to contain nothing related to file associations.
This beginner question should probably be an easy one... I hope!
- Get Info on the file in Finder (⌘I)
- Find the "Open with:" section
- Change the application to the one you want
- Click "Change All…" to apply the change for all files of the same type.