On macOS, one can set the "Open With ..." application in the information panel of a file without changing the default for this file type. However, doing this for a number of files is very tedious. A simple case is to change all .txt files in a directory to a special editor, but leave the system wide default (usually TextEdit). I have tried AppleScript, command line tools as well as a minimal GUI app (using LSSetItemAttribute), but all fail because of a lack of permission. Is there any way to achieve this?
Setting the "Open With ..." application for multiple files
Thank for the post.
We appreciate your interest in participating in the forums! These forums are for questions about developing software and accessories for Apple platforms. Your question seems related to a consumer feature and is better suited for the Apple Support Communities
https://discussions.apple.com/welcome
Albert Pascual Worldwide Developer Relations.
You can do that. Select all the files you want to change. Right click on one of the files. Press and hold the option key and left click on show inspector. On the modal that opens select the application to use in the drop down in the open with section. Close the modal and the files will now open with the selected application.