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. This method will add a menu item in the popup menu list use the macOS service when you right-click a file or folder.
Add Copy Path Menu Item In Popup Menu List.