How To Get File Path In Mac

As a macOS beginner, you may be confused when you want to get a folder or file’s absolute path value. You can not find the folder’s detail path value as in Windows. This article will tell you how to get a file or folder’s absolute path value in macOS and how to display the file or folder’s absolute path value in the macOS Finder title bar.

1. Add Copy Path Menu Item In Popup Menu List.

This method will add a menu item in the popup menu list use the macOS service when you right-click a file or folder. Click that menu item, it will copy the file or folder’s path value such as /etc/hosts into the macOS clipboard, then you can paste it to anywhere that you want.

  1. Click Finder app in desktop Dock.
  2. Click Go —> Applications in the top menu item bar.
  3. Double click the Automator app in the right panel, it will open the below dialog.
  4. Double click Service app in the above picture, then select files or folders in Service receives selected drop-down list, and select Finder in the drop-down list after it.
  5. Drag and drop Copy to Clipboard action from left actions library to the right panel.
  6. Click the red close button to close the dialog, it will popup a dialog to ask you to save the service. Input Copy Path in the Save service as input box and click Save button.
  7. Now right-click any file or folder, you can see the Copy Path menu item in the menu list Services sub-menu.
  8. Click the menu item, it will copy the selected folder’s absolute path in macOS clipboard. Open a text editor and paste the path value there to see it.

2. Delete Service Menu Item In Right Click Menu List.

If you want to delete the menu item just added, please follow the below steps.

  1. Open macOS Finder, click Go —> Go to Folder… menu item, input ~/Library/Services/ in the popup dialog Go to the folder input text box, click the Go button.
  2. Then it will open the Library / Services ( /Users/jerry/Library/Services ) folder like below.
  3. Expand Services folder and right-click the Copy Path item under it, then click Move to Trash menu item to remove it.

3. A Simple Way To Get File / Folder Absolute Path In macOS.

  1. There is also a simple way to get file or folder absolute path in macOS.
  2. Select the file or folder in macOS Finder.
  3. Press Command + C to copy the file or folder in macOS Finder.
  4. Open a terminal window in macOS, then Press Command + V in the terminal window.
  5. Now you can see the file or folder’s absolute path in the terminal command-line.

4. Get macOS File Or Folder Absolute Path By Show Path Bar Menu Item.

  1. Open a macOS Finder window and select the file or folder.
  2. Click View —> Show Path Bar menu item in the Finder top menu bar.
  3. Now you can find a path bar at the bottom of the macOS Finder window.
    macos finder path bar
  4. Right-click one folder or file name in the above macOS Finder path bar.
  5. Then click Copy “……” as Pathname menu item in the popup menu list.
  6. Then paste the clipboard content to a text editor, you can get the file or folder’s absolute path in it.

5. Get macOS File Or Folder Absolute Path By Get Info Menu Item.

  1. Right-click the file or folder in the macOS Finder window.
  2. Click the Get Info menu item in the popup menu list.
  3. Find the General: —> Where: in the top area of popup dialog.
  4. Right-click the path after the Where: item, click the Copy menu item in the popup menu list.
  5. Paste the clipboard content to a text editor, then you can get the file or folder’s absolute file path there.

6. Show Folder or File Absolute Path In Finder Title.

Generally, macOS Finder only displays the current folder name in the title area but follow the below steps you can make it display the absolute file path of the folder in the macOS Finder title.

  1. Open a terminal window, execute the below command.
    $ defaults write _FXShowPosixPathInTitle -bool TRUE
    $ killall Finder
  2. Now when you explore a folder in Finder, you can see the absolute file path in the Finder title.
  3. If you want to display the current folder name only ( does not include the file or folder’s absolute path ) in the macOS Finder title, you can execute the below command in the macOS terminal to change it back to the original display.
    $ defaults delete _FXShowPosixPathInTitle
    $ killall Finder
0 0 votes
Article Rating
Notify of

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Oldest Most Voted
Inline Feedbacks
View all comments
Fidan Hajiyeva
Fidan Hajiyeva

Thank You so much! It really helped!


Thanks! Very helpful and well explained.

Emirhan Uzunlar
Emirhan Uzunlar

You’ve helped me big time! Thank you so much.

Would love your thoughts, please comment.x