I want to make macOS open RAR files: On double-click macOS should open Terminal with command
unrar x /path/filename.rar
Is there any way to do this?
Stack Exchange network consists of 181 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.Visit Stack Exchange
Ask Different is a question and answer site for power users of Apple hardware and software. It only takes a minute to sign up.Sign up to join this community
Launch Automator.app and create a new Application.
Add the "Run Shell Script" action. As unrar seems to be a command installed in
/usr/local/bin/, set the Shell type to
/bin/bash, and Pass input to
You'll be given a free bit of shell code, which you can easily modify:
for f in "$@" do /usr/local/bin/unrar x "$f" done
Save the app. Then select a .rar file, choose File > Get Info, and change the default handler for that type to your new app.
Alternatively, there are plenty of third-party apps that unwrap rar and other archive types, such as TheUnarchiver.