You can find it in the /Applications/Utilities folder. Understanding paths will help you understand how macOS actually sees your files. This would only be good if you didn't know to connect it to services for quicker execution than the built in way or needed a different format for the path. Macs have a utility called Terminal which provides a command line interface. I could see making an AppleScript or swift script to do this for free as well if you had a well defined string you wanted to get from the location of a specific file that would be general to all files once you coded it. I also don't have to do multiple clicks and I copy off paths all the time so it's worth the expense to me. Strange how you can't right-click on the Finder-view icons or even the desktop-icon for additional properties including the file-paths for external media-drives connected to a device running macOS Catalina you can access file-folder paths and other properties from said locations in Ubuntu 18.04. You can process several files at once, control all sorts of tweaks to how the path is constructed. That being said, I use Path Snagger 2 and am super happy with it as I can control POSIX/SMB/HFS and file://whatever format for the path that gets copied. By design, Apple only shows a path for network share files in the get info pane so you'll need to attach a service to Finder to get this in general (for reasons, I'm sure I'd love to hear over a drink). So heres an attempt at some reasonable portability (Ive checked it with bash as sh and dash), resolving an arbitrary number of symbolic links and it should also work with whitespace in the path(s. In the Get Info panel, locate the General section and look at the Where heading. Right-click the item and choose Get Info from the menu. Open Finder and locate the file or folder in question. I love the control / option copy as path trick, but can never seem to remember it, so I end up using Finder services menu to let you extend this function. While the original question does explicitly ask for a 'Bash script', it also makes mention of Mac OS Xs BSD-like, non-GNU readlink. You can also see the full path for any file or folder using the Get Info panel. To try this yourself, launch the Terminal application and issue the proper syntax.
0 Comments
Leave a Reply. |