10

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 ?

0

2 Answers 2

3

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

See also this question at Super User.

0
3

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.

4
  • 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.
    – alecail
    Commented Oct 2, 2012 at 18:23
  • It inserts the absolute paths only in plain text mode.
    – Lri
    Commented Oct 2, 2012 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
    Commented Oct 2, 2012 at 19:09
  • @jmk Thanks for the comment. I can see situations where it can be useful.
    – alecail
    Commented Oct 3, 2012 at 6:15

Not the answer you're looking for? Browse other questions tagged .