How To Get File Path In Mac

As a MacOS beginner, you may be confused when you want to get a folder or file absolute path value. You can not find the folder’s detail path value as in Windows. This article will tell you how to resolve it.

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

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

  1. Click Finder app in desktop Dock.
    mac finder command icon new
  2. Click Go —> Applications in the top menu item bar.
    macos finder go applications automator
  3. Double click Automator app in right panel, it will open below dialog.
    macos automator service
  4. Double click Service app in above picture, then select files or folders in service receives selected drop down list, and select Finder in the drop down list after it.
    select files and folders and finders in automator service
  5. Drag and drop Copy to Clipboard action from left actions library to right panel.
    drag copy to clipboard from left panel to right
  6. Click 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.
    input macos service name copy path
  7. Now right click any file or folder, you can see the Copy Path menu item in the menu list Services sub menu.
    copy path menu item added in right click menu list
  8. Click the menu item, it will copy selected folder’s absolute path in MacOS clipboard. Open a text editor and paste the path value there to see it.
READ :   How To Install Tomcat In MacOS

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

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

  1. Open web browser such as Safari. Input ~/Library/Services/ in the web browser url address box, click Enter.
  2. Then it will open Library / Services ( /Users/zhaosong/Library/Services ) folder like below.
    library services folder
  3. Expand Services folder and right click the Copy Path item under it, then click move to trash menu item to remove it.

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

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

Open a terminal window, execute command defaults write com.apple.finder _FXShowPosixPathInTitle -bool TRUE;killall Finder.

Now when you explore a folder in Finder, you can see the absolute file path in the Finder title.

display absolute path in finder title area

If you want to display current folder name only in Finder title, you can execute below command in MacOS terminal to change it back to original display.

defaults delete com.apple.finder _FXShowPosixPathInTitle;killall Finder 

(Visited 750 times, 1 visits today)

Leave a Reply

Your email address will not be published. Required fields are marked *

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