Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I'm trying to use the Finder to search my code base. For example I would like to find every files that ends with ".m" and contains "keyDown".

Finder does this, but in the Finder window showing the results, the full path can not be displayed individually on each line, but only if you click on the file. In this case it's displayed on a status bar on the bottom.

Is there a way with Finder, or possibly another tool, to display the full path for each file next to the filename ?

share|improve this question
add comment

2 Answers

up vote 3 down vote accepted

HoudahSpot allows adding a column for either short paths or absolute paths.

See also this question at Super User.

share|improve this answer
add comment

The easiest way to get full paths from a Finder search result is to drag the items into a text field (e.g., TextEdit).

  1. Use the standard Find dialog in the Finder to search for files.
  2. Select all matching items.
  3. Open TextEdit with a blank document and format it as a plain Text (Format/Make Plain text)
  4. Drag the items into the TextEdit window.

Voilà, full paths!

This actually works for any file in the Finder; for example, it's useful for dragging a specific file from Finder into a Terminal window instead of entering the path by hand.

Note that if you copy-paste into a text field instead, you'll only get the filenames, not the full paths.

share|improve this answer
    
My goal is to use the path directly to distinguish files. For example, if the results consist of 100 times the file "view.m", this approach won't really help. BTW, it doesn't copy the full paths in Textedit, but it inserts the content of the file instead. (on OSX 10.8), but it works in Terminal. –  Antoine Lecaille Oct 2 '12 at 18:23
    
It inserts the absolute paths only in plain text mode. –  Lauri Ranta Oct 2 '12 at 18:59
    
@LauriRanta is correct, your document must be in plain text mode. It does work on 10.8, as well. If you want something more sophisticated with a GUI, Lauri's suggestion is better. –  jmk Oct 2 '12 at 19:09
    
@jmk Thanks for the comment. I can see situations where it can be useful. –  Antoine Lecaille Oct 3 '12 at 6:15
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.