How to Find and Copy File Paths in iOS Using the Files App

Get file action for shortcuts

This tip is something I accidentally discovered today and it’s helpful if, like me, you have certain shortcuts that grab and save content from folders. It’s an easy way to copy file paths so you don’t have to type them out.

Method One: Manual

There are two actions in particular in Shortcuts that I’m referring to: Get File and Save File. Both actions have a toggle to show the document picker. This is the “GUI” way where the Files window appears and you can search around to find the file you need or save it in a particular folder. If you turn that toggle off it will instead ask you for the file path, which is the “command line” way to get things done.

Here’s where to find the file path.

  1. Open Files.
  2. Long-press on a file and tap Info.
  3. File information is shown in this area, like creation/modified/last opened dates.
  4. Long press the section called Where, which is the file path, and tap Copy.

Get file action in shortcuts

In my file system the file path will look something like this:

⁨iCloud Drive⁩ ▸ ⁨⁩⁨Shortcuts⁩ ▸ ⁨⁩⁨[Self]⁩ ▸ ⁨⁩⁨[S]-Photo⁩ ▸ ⁨⁩⁨[S]-Colors⁩ ▸ ⁨⁩⁨[S]-Palettes⁩

When you paste that into a shortcut you’ll have to remove iCloud Drive and Shortcuts, and replace the arrows with a slash. The “shortcut-friendly” file path should look like this:

⁨⁨⁩⁨[Self]⁩/⁨⁩⁨[S]-Photo⁩/⁨⁩⁨[S]-Colors⁩/⁨⁩⁨[S]-Palettes⁩

As an example, I can save an image of a color palette I like into the [S]-Palettes folder. Using a file path means I don’t have to manually dig around to find that folder; it gets saved there automatically. And automation is what Shortcuts is all about.

Method Two: Actions

Update – 2021-12-17: Thankfully, there is now a fantastic app called Actions that can retrieve the file path for you.

Leave a Reply

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