Make your life easier - Get a file path in macOS

Make your life easier - Get a file path in macOS

?? Tech can make your life easier (sometimes) ??

?? A shortcut to find a file path in macOS

#letsfixmacostogether

As a developer I deal with file paths VERY often. For example, I download a bunch of CSV files, unzip, and need to run a script in that folder.

How do you go from a file in Finder to a path in the CLI?

One option is to remember the location and use auto-complete in the terminal (?? aka Symphony in tab-tab-tab-tab Minor ??).

But:

  • macOS apps often open Finder windows in random locations, making it tedious to find the exact path.
  • Rule #1 of productivity: your brain is for thinking, not remembering.

Trick #1: Use a keyboard shortcut

Highlight the file or folder, then type ?+?+c?(option-command-c).

?? Bam, the filepath is in your clipboard.

Note that the Finder team agrees this is useful, but they won't make it discoverable (like many things in the ecosystem).

Remember: the brain is for thinking, not remembering keyboard combinations you use twice a week.

Trick #2: Use an Apple Shortcut

Here is what it looks like:

The Copy File Path shortcut we'll create

Obvious, discoverable, simple.

Let's fix macOS together, you can install the shortcuts using this iCloud share:

?? https://www.icloud.com/shortcuts/006a7a221ad14a278567d477b1c76ebf


If you want to re-create it yourself:

  1. Create a shortcut, enable ?? Use as Quick Action and ?? Finder on the Details panel.
  2. Add the action: Get Details Of File, pick File Path`
  3. Add the action: Copy to Clipboard



Laurent Senta

Senior Full-Stack Engineer - Developer Productivity

9 个月

To save even more time, the conclusion is to install that Apple Shortcut, which sits in your "right-click menu": https://www.icloud.com/shortcuts/006a7a221ad14a278567d477b1c76ebf

要查看或添加评论,请登录

Laurent Senta的更多文章

  • How your tools might kill your confidence

    How your tools might kill your confidence

    ????? In 2003, researchers asked their students to write down their BEST or WORST qualities. “It’s a graphology study,”…

  • orbital-list ?? - React JS Library

    orbital-list ?? - React JS Library

    Happy new year LinkedIn'ers! Here's my first gift of the year, A while ago, I wrote a web application that lets you see…

    1 条评论
  • Blockchain, what's the point for a Developer?

    Blockchain, what's the point for a Developer?

    Blockchain-related technologies are in full-hype mode these days. I had flash, a déjà-vu, of the “NoSQL” trend:…

    1 条评论

社区洞察