After you find a file using Finder, how do you get its file path? [duplicate]

Solution 1:

While in the Finder, go to the Menu Bar and select View > Show Path Bar. There will be a file path at the bottom of the window.

If you need to, you can right-click the file in the Path Bar and copy the Pathname.

Solution 2:

  • Control click on the file (or right click)
  • Hold down option (when the contextual menu is still visible)
  • Select copy "filename" as Pathname
  • Release option

The keyboard shortcut Option - Command - C does the same work as the above GUI steps.

The full path to the file is in the pasteboard - so you can paste it where you need it. Also, Option - Command - P toggles the path bar in Finder windows. You need to select the file to see the path whereas the first option works with any visible file.

Lastly, you can control click (right click) the folder at the top of the Finder window to reveal the path hierarchically / visually.

Solution 3:

On selected file, CMD+i > Where

Solution 4:

Here's a visual demonstration of how you can go about searching for a file in Finder and the various ways with which you can determine the location/path of the desired file. The instructions follow the demonstration:

Searching for files in Finder and reading path

Here are the steps followed in the demonstration above along with all the aiding keyboard shortcuts.

  1. Open a new Finder window. Keyboard shortcut Command + N can be used to open a new Finder window with the Finder app in focus.

  2. With the Finder window open, switch to Find mode by using the keyboard shortcut Command + F.

  3. Enter the search term to look for the desired files/folders.

  4. Click to select the desired search result. The Finder window in Find mode automatically displays the Path Bar at the bottom. The Path Bar displays the fill hierarchy of folders you have to traverse starting from the currently logged in users Home directory.

  5. Control + click or right/secondary click on the file icon. With the Finder context menu open, press and hold the Option key to change the Copy "filename" command to Copy "filename" as Pathname. Invoking the command copies the full file path (starting from the root directory) to the system clipboard.

  6. Click on the Show in Enclosing Folder command in the Finder context menu to open the folder containing the file in a separate Finder window. The Finder window opens with the file selected automatically.

  7. With the file selected, you can also Command + click on the folder Proxy icon (shown in the Finder window Title Bar) to reveal the hierarchy of folders required to be traversed starting from the root directory to reach the file.