Skip to content


Selecting files in the Finder using a Regular Expression

Daring Fireball linked to a useful perl script for selecting files in the Finder using a Regular Expression.  However, there’s no quick and easy way to run the script other than double-clicking on it.  Usefully, one can use Automator to create a “Service”, that is, a command that appears in a contextual menu as appropriate.  The following is a snapshot of my Automator action, with the shell script pasted in the appropriate location.  It doesn’t quite work, as when you run it as a service, it throws, by default, the path of the file you right-click on into the dialogue box, but this could be useful if you want to use part of its name in the expression.

Automator action

Posted in Computers.