Friday, January 6, 2017

Easy Yay to Get File/Folder Path

To get full path of a file or folder in Mac is not easy nor straightforward. There is no address field like text in Finder to display the full path when a file or folder is selected. There may be status bar displaying its path but not copiable.

I think that long time ago, in Mountain Lion OS, there was an easy way to get file or folder's path. This could be done in Spotlight. If a file or folder name is displayed in Spotlight, you could copy or cmd+c to get its full path to clipboard.

However, this feature is gone in the current Mac OS. The copy in clipboard is selected pasted-out depending on the target. For example, only the file name is pasted out in most cases, such as in Spotlight, Safari's address bar, or most of text field in other apps. In TextEdit or Pages, the content of the file might be pasted out.

Even though, I figured out that there is a way to get full path: from Terminal!

Terminal is an app that provides text-based access to Mac OS. Terminal has been very old app since Unix. From there you can communicate with Mac OS by various text commands. Here I would not talk about it usage or functions.

We can use Terminal to paste full path! This is very simple:

  1. Open Finder
  2. Either browse to a file/folder, or search for a file/folder from Finder's spotlight
  3. Select a file or folder
  4. Copy it by pressing Command+C
  5. Open Terminal from Spotlight (Command + Space to open Spotlight, type in "Terminal". If you cannot find it, you can locate it in /Applications/Utilities)
  6. In Terminal, press Command+V to paste full path!

No comments: