Archiving items via a keyboard shortcut

Reader Walter Lenk has hit a small bump in the transition from Tiger to Leopard. He writes:

I recently switched from using OS 10.4.11 to using OS 10.5.7. Using 10.4, I added a keyboard shortcut (Shift-Command-Z) for the Archive command item in the File menu. In Leopard this file menu item has changed to Compress followed by the name of the selected item. Since the item name changes with the file selected, I can’t seem to implement it in the Keyboard Shortcuts section of the Keyboard & Mouse system preference because Keyboard Shortcuts demands a command’s exact name. Any ideas on how to do this?

Walter, I try to offer the best solutions possible, but I’d keep an eye on this entry’s comments because what I’m about to suggest makes me think there has to be a better way. Until that way appears, here’s mine:

Launch Automator (found in /Applications) and when prompted for a starting point, select Custom and click Choose. In the Untitled window that appears, enter Create Archive in the Search field. The Create Archive action should appear at the top of the list. Drag it to the workflow area to the right.

Choose File -> Save As Plug-in. In the sheet that appears choose Finder from the Plug-in For pop-up menu. Name the thing “Archive” and click Save. Quit Automator.

Go to the Finder and Control-click (or right-click) on an item that you’d like to compress. In the contextual menu, select More -> Automator. In the hierarchical menu that appears you should see your Archive command. Feel free to give it a try. It should archive the selected item.

Next, we need to assign a keyboard shortcut to that Archive command. Regrettably, you can’t do this successfully within the Keyboard & Mouse system preference. It’s happy to try but the shortcut won’t work.

We therefore turn to a third-party utility. There are any number of them that will do the job but I’ve chosen Abracode’s Shortcuts because it’s free and does the job without complication.

Automator's Archive action.

Download Shortcuts and launch it. In its Setup tab click the Start button in the ShortcutObserver Status area. If you don’t, your shortcut won’t work. If you want this shortcut to be available to you always, click the Add button in the ShortcutObserver Login Startup area. This ensures that Shortcut will run even after you restart your Mac.

Click the Assign Hot Keys tab. From the File area click the pop-up menu, choose Automator, and then choose the Archive command from the contextual menu that appears. A sheet will appear that reads “Press Key Combination to Assign the Shortcut to Item.” Go ahead and press the key combination that you want to use to trigger the Archive command. Click the Assign button and quit Shortcuts.

Assign a shortcut to the Archive plug-in with Shortcuts.

Return to the Finder, select an item you’d like to archive (or multiple items you want to combine into a single archive) and press your keyboard shortcut. Doing so should result in an archive of the selected item(s).

Shop Tech Products at Amazon