Skip to main content
< All Articles

How to get the file path for a file or folder in SharePoint

Posted on October 22, 2025
SharePoint

As I build sites and Intranet portals for my clients, a frequent request that I hear is to create links to files and folders scattered across multiple sites and folders. In such cases, I always recommend grabbing a direct file path of the file or folder and using it to link to the desired content. In this article, I will explain what this is all about and how easy it is to generate a true file path.

The Problem with the “Copy link”

The usual way of generating a link to a file or folder would be by navigating to the item, choosing the Copy Link functionality, and using that to link to the content.

Filepathfilefoldersharepoint2

However, there are a few key issues with his approach:

  • The link generated using this method often provides more access than initially intended. For example, if you have a site where certain users have read-only access, if you copy a link to a file or folder, it will generate a link that everyone can edit, which will allow the recipients to edit the document.file path for a file or folder in SharePoint
  • The link generated using this method is a dynamic, encoded link. Looking at the link, it is hard to determine where the file lives (specific library, folder, subfolder). Here is an example of a link generated using Copy Link functionality: https://sharepointmaven.sharepoint.com/:b:/s/hr-team/EXBr53t-YIxEoRrp60E6q-cBfeePe78i333B1tuWPuj9yQ?e=paDgKo
  • Links generated using this option tend to expire and break for no reason

As such, I always prefer linking directly to the item using its true file path/breadcrumb.

How to get the file path for a file or folder in SharePoint

  1. To get the file path of an item, just click on the check box next to a file or folder, then click on the Details pane file path for a file or folder in SharePoint
  2. Scroll all the way down, and you will get to see the path/breadcrumb at the bottom of the Details Pane. Click the copy icon next to the file path to copy it.file path for a file or folder in SharePoint
  3. Use this path for linking from the Quick Links web part, navigation menu, or any other area you want to link from. It will look something like this: https://sharepointmaven.sharepoint.com/sites/hr-team/Shared%20Documents/General/Policies/Safety/OSHA%20Policy.PDF

About Me

I’m Greg Zelfond, a U.S. based SharePoint consultant, and I provide affordable out-of-the-box SharePoint consulting, training, and configuration assistance to small and medium-sized businesses all over the world.

Need help?
Foldercardvivaconnections 2481682565

Folder Card in Viva Connections

I usually blog about SharePoint Web Parts and don’t devote much time to Viva Connections cards. But recently, Microsoft added some really lovely and eye-catching cards to that promise to…

Read More