

Using how by default in Finder a ZIP archive is created in macOS, only recursing the relative path from within the PWD, the same applies to the example shell script code used in the first Run Shell Script action of the Automator Quick Action shown below.

You will still have to grant the permission the next time they run, but not there after. Go to System Preferences > Security & Privacy > General, click the lock to make changes, enter your credentials, click the Allow button. NOTE: If rar and unrar are not properly signed it will throw an error message. NOTE: In order for these workflows to work, Finder must be given Full Disk Access in: System Preferences > Security & Privacy > Privacy The two Automator Quick Actions work as advertised with the settings as shown in the images of the workflows, further below, so use the same settings!

If a selected file/folder to be archived is not readable it will throw an error message and an incomplete RAR archive may be created. The example shell script code used in this answer was tested under macOS Catalina 10.15.4.Īs coded the location the RAR archive is to be created/extracted to must be readable/writable to you with normal privileges, otherwise the RAR archive is created/extracted on your Desktop.
