Diehard Unix gurus are going to be shocked to see Excel and the Unix shell mentioned in the same hint. Yet this can prove a very powerful combination for the average user. Unix gurus should read on, too. Say you want to remove a bunch of files from different locations in your file system, for instance, temporary files. The Unix way of doing things would be:
find -name "*~" -exec rm {} ;
We are doing nothing special here: find by name and then remove. Yet this bit of shell may be above the skill or the courage of many Mac users. In real life, you may want to do more complex searches (by modification date, in multiple locations, file type, ...), or do more complex operations (copy, rename, ...). You will quickly find yourself in need of a full-blown shell script which loops over the results from mdfind. Well, there is an easier solution involving HoudahSpot and your favorite spreadsheet (Numbers, Excel,...).
Next, select the desired results from the list and hit Command-C (copy). In your spreadsheet application, paste the file paths into column B (or any column but the first). You may have to drop excess columns (file name, modification date, ...). You may also find a use for such a column in some special situations.
In the first cell of column A, enter your command. E.g. rm for remove. Instruct the spreadsheet application to "fill down" column A.
Now copy all data rows from columns A and B. If you were to paste the result into Terminal.app, you would be asking the shell to remove all the files matching your HoudahSpot search. Nothing special: you could have gotten the same result using HoudahSpot alone.
So now we factor in the text editing capabilities of the spreadsheet app. For instance, change all .jpg extensions to .jpeg extensions. For this we copy column B to column C and use Find & Replace to replace .jpg with .jpeg in column C. In column A we fill down with the mv string: the move command. Now, if we copy columns A, B and C to Terminal.app, we would rename a batch of files without having to write a loop.
Likewise we could use other columns from HoudahSpot -- like modification date, image resolution, etc. -- in column C to create dynamic file names.
[robg adds: If you're going to try this, I would suggest using echo in front of your command in Excel, then seeing what comes up when you paste in Terminal -- just to be sure you're getting what you expect to be getting. Also, any time you're doing rm on large numbers of files, making sure you've got a current backup is a good idea.]
Mac OS X Hints
http://hints.macworld.com/article.php?story=20080125092517195