How to setup a specific application to open all files with unknown extension
I am trying to open some files with unknown extension and it always ask me to choose an application from local or AppStore.
The problem is, I sometimes need to generate some text file with extensions like ".backups",".config" or even some random text like ".abc123". It means on my Mac, in most time files with unknown extensions can be read by a text editor (personally I prefer Sublime Text).
Is it possible that all files with unknown extension can be automatically opened with a default application like Sublime Text?
This is different from Choose a default app for opening files with no extension? which asks about how to handle files without extension. Here I'm looking for a way to handle unknown extensions (kind of a wildcard rule).
Solution 1:
I don't think that's possible. OS's usually needs register how to handle each file first.
But it's not all lost: here is a situation that Automator can handle easily.
Here I'll show you, how to create a item menu in the right click context menu, that you can easily select to open your file, better than Open With option.
Steps:
-
Create a new Service with Automator.
-
Set files or folders in the first field and Finder.app in the second.
-
Add an action called ‘Open Finder Items’ and select your application.
For last, save it and name it as you wish.
Now, if you need open a file with unknown extension, just right click and select your newly created service.
‘Define application for files’ action does not work for file extension, is just for a particular file.